Simple templates for the Scripted Editor

Engineering | Andrew Eisenberg | January 23, 2013 | ...

We recently released 0.3 of the Scripted Editor, and we are making fast progress towards our next release. One of the major goals of Scripted Editor 0.4 is extensibility and part of the extensibility story is a simple, extensible templating mechanism (the other part is a powerful plugin model, which will be described in a future blog post). In this post, I will introduce custom code completions and templates for the Scripted editor.

Sublime Text is an excellent, general purpose editor. It is highly configurable and many users of Scripted also use Sublime. Because of this, we want to make extensions to Sublime compatible with Scripted where it makes sense. One of these areas is sublime-completions files. These files specify lists of completions for a given content type (typically mapped to file…

This week in Spring - 22 January, 2013

Engineering | Josh Long | January 21, 2013 | ...

Welcome to another installment of This Week in Spring! As usual, we've got a lot to cover, so let's get to it!

    		  <LI> The future is now and it has a name and version - <EM>Spring 4.0</EM>. <a href="http://blog.springsource.org/2013/01/16/next-stop-spring-framework-4-0/">Juergen Hoeller outlined the proposed next iteration of Spring, Spring Framework 4.0</a>!  </LI>	
    		
        <li>If you missed the live webinar of the Spring Framework 3.2 GA release, <a href="http://www.youtube.com/watch?v=fb5YG2W1srA">check out the replay</a>, which also has a brief discussion Spring Framework 4.0.</li>
        <li> Costin Leau has announced that <a href="http://www.springsource.org/node/3787">Spring for Apache Hadoop 1.…

This Week in Spring - January 15th, 2012

Engineering | Josh Long | January 16, 2013 | ...
 Welcome to another installment of <EM>This Week in Spring</EM>! Can you believe we're already halfway through January?  We've got a <EM>lot</EM> to cover, so let's press on!  In particular, there's a <EM>lot</EM> of great video content to keep you occupied for hours this week. Enjoy! 
 </P> 
 <OL>

<li>Join Scott Andrews as he discusses the role of Javascript in an exciting webinar on  January 24, 2013: <a href="http://www.springsource.org/node/3767" title="Webinar: Architecture of a Modern Web App"> Architecture of a Modern Web App</a>.</li>
<LI>Join Brian Cavalier and John Hann as they…

Next Stop: Spring Framework 4.0

Engineering | Juergen Hoeller | January 16, 2013 | ...

Dear Spring community,

I'm happy to announce that the next iteration of the core framework will be Spring Framework 4.0!

The current 3.2 generation is a natural conclusion of the 3.x line, with Java-based configuration and REST having been recent focus areas next to Java SE 7 and Servlet 3.0 support.

For Spring Framework 4.0, our focus is on emerging enterprise themes in 2013 and beyond:

  • First-class support for Java SE 8 based Spring applications: language features such as lambda expressions; APIs such as JSR-310 Date and Time
  • Configuring and implementing Spring-style applications using Groovy 2: Groovy-based bean definitions; Groovy as the language of choice for an entire app
  • Support for key Java EE 7 technologies: including JMS 2.0, JPA 2.1, Bean Validation 1.1, Servlet 3.1, and JCache
  • Enabling WebSocket-style application architectures: support for JSR-356 compliant runtimes and related technologies
  • Fine-grained eventing and messaging within the application: building on our existing application event and message listener mechanisms
  • Pruning and dependency upgrades: removing deprecated features; raising minimum dependencies to Java 6+ etc

Building on the momentum and the preparation work behind Spring Framework 3.2, we intend to have yet another one-year iteration and reach 4.0 GA by the end of 2013.

We'll be tracking OpenJDK 8's schedule…

This Week in Spring - January 8th, 2013

Engineering | Josh Long | January 08, 2013 | ...

Welcome back to another installment of This Week in Spring. As usual, we've got a lot to look at, so, without further ado...

  1. GigaOM has a nice roundup of some of the exciting and important tools in the big-data ecosystem right now. There are many different tools serving different segments of the use cases,
    <a href="http://gigaom.com/2012/12/18/a-programmers-guide-to-big-data-12-tools-to-know/">and of course Spring Data is mentioned in there</a>, too!
     
    </LI>
     <LI>
    	 The <EM> ODBMS Industry Watch</em> blog 
    		and professor Roberto V. Zicari  
    		has a nice  interview 
    		
    		 <a href ="http://www.odbms.org/blog/2013/01/the-spring-data-project-interview-with-david-turanski">with Spring ninja David Turanski on Spring Data</a>. Definitely a good read!
    
    	
    	 </LI>	 
    
    
     <LI…

Scripted Editor 0.3 release available

Engineering | Andy Clement | January 08, 2013 | ...

In October the first public version of the Scripted code editor was made available, a browser based editor using a Node.js local server, with a focus on providing a great JavaScript editing experience. Today the first update is available, version 0.3.

A full set of Release Notes about the latest features is available here. Here are some of the highlights:

 

NPM Installable

Scripted can now be installed simply using the Node Package Manager (npm) on either Windows, Linux or Mac:

npm install -g scripted

(might need a 'sudo' prefix on mac/linux). Once installed the 'scr' command can immediately be used to launch Scripted. As part of…

This Week in Spring - January 1, 2013

Engineering | Josh Long | January 01, 2013 | ...

I almost typed 2012 when I composed this post! It's already 2013! I hope your holidays were wonderful.

Welcome back to another installment of This Week in Spring! It's time to begin another exciting new year (and to remember to use the correct new year in text!). With that, let's have a look at
the new and exciting content from all around the community.

    <LI> The epic book by <a href="https://twitter.com/rob_winch/status/284812769197441024">Spring Security lead Rob Winch and Peter Mularien   on   Spring Security 3.1</a> by Packt publishing is now out!  
    	  The book is a great resource for people who are looking at Spring Security and want  
    	the scoop from the source.
    	 </lI>
    
    
    
      <LI> Are you…

This Week in Spring - 18 December, 2012

Engineering | Josh Long | December 19, 2012 | ...

Welcome back to another installment of This Week in Spring!

Can you believe we're already further along through December than not? Time sure flies, and yes, we are staring down the end of the year already - but the holiday season usually brings a SpringFramework release right around this time of year, so we're feeling festive! We've even gots tons of extra SpringSource buttons to celebrate.

Buttons!

  1. First and foremost, Spring 3.2 has gone GA! Just read the post. Waay too much awesome in one release, and - if you've been following this series over the year than you know I've been looking forward to it. Come back and read the rest when you've upgraded your application and played with some of the awesome new stuff! I'll wait...
	    You know what the best part is? Usually, after a new Spring release, the release train of other Spring projects is quick to adopt - so expect lots of releases in the new year!</LI>  
  • Next up, Spring Security lead and ninja Rob Winch just announced Spring Security 3.2.0.M1, packed with new features for Servlet 3 environments, among other things.
  • <LI> We could just stop right there, you know?  BUT, there's more! In this…

    Spring Roo 1.2.3.RELEASE available

    Engineering | Alan Stewart | December 18, 2012 | ...

    The Spring Roo team is pleased to announce the availability 1.2.3.RELEASE.  This is the third maintenance release for 1.2 and includes fixes for a number of issues and includes support for Spring Framework 3.2.0. Please see the change log for a list of the bugs and improvements completed.

    I hope you enjoy this new release!

    Alan

    Spring Roo Project Lead

    Spring Security 3.2 M1 Highlights, Servlet 3 API Support

    Engineering | Rob Winch | December 17, 2012 | ...

    Last week I announced the release of Spring Security 3.2 M1 that contains improved Servlet 3 support. In this post, I will introduce some of the more exciting features found in the 3.2 M1 release. Specifically, we will take a look at the following new Spring Security features:

    Concurrency Support

    You might ask "What is concurrency support doing in a release that has a Servlet 3 focused theme?" The reason is that the concurrency support provides a foundation for all the other features found in this release. While the concurrency support is used by the Servlet 3 integration, it can also serve as building blocks to support concurrency and Spring Security in any application. Let's take a look at Spring Security's concurrency support now.

    DelegatingSecurityContextRunnable

    One of the most fundamental building blocks within Spring Security's concurrency support is the DelegatingSecurityContextRunnable. It wraps a delegate Runnable in order to initialize the SecurityContextHolder with a specified SecurityContext for the delegate. It then invokes the delegate Runnable ensuring to clear the SecurityContextHolder afterwards. The DelegatingSecurityContextRunnable looks something like this:

    public void run() {
      try {
        SecurityContextHolder.setContext(securityContext);
        delegate.run();
      } finally {
        SecurityContextHolder.clearContext();
      }
    }
    

    While very simple, it makes it seamless to transfer the SecurityContext from one Thread to another. This is important since, in most cases, the SecurityContextHolder acts on a per Thread basis. For example, you might have used Spring Security's <global-method-security> support to secure one of your services. You can now easily transfer the SecurityContext of the current Thread to the Thread that invokes the secured service. An example of how you might do this can be found below:

    
    Runnable originalRunnable = new Runnable() {
      public void run() {
        // invoke secured service
      }
    };
    
    SecurityContext context = SecurityContextHolder.getContext();
    DelegatingSecurityContextRunnable wrappedRunnable =
        new DelegatingSecurityContextRunnable(originalRunnable, context);
    
    new Thread(wrappedRunnable).start();
    

    The code above performs the following steps:

    • Creates a Runnable that will be invoking our secured service. Notice that it is not aware of Spring Security
    • Obtains the SecurityContext that we wish to use from the SecurityContextHolder and initializes the DelegatingSecurityContextRunnable
    • Use the DelegatingSecurityContextRunnable to create a Thread
    • Start the Thread we created

    Since it is quite common to create a DelegatingSecurityContextRunnable with the SecurityContext from the SecurityContextHolder there is a shortcut constructor for it. The following code is the same as the code above:

    
    Runnable originalRunnable = new Runnable() {
      public void run() {
        // invoke secured…

    Get the Spring newsletter

    Stay connected with the Spring newsletter

    Subscribe

    Get ahead

    VMware offers training and certification to turbo-charge your progress.

    Learn more

    Get support

    Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

    Learn more

    Upcoming events

    Check out all the upcoming events in the Spring community.

    View all