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…

    Spring Framework 3.2 goes GA

    Engineering | Juergen Hoeller | December 13, 2012 | ...

    Dear Spring community,

    Exactly one year after the Spring Framework 3.1 release, I'm pleased to announce that Spring Framework 3.2 is generally available now!

    We recommend an upgrade from all previous Spring releases, in particular from Spring Framework 3.1.x which this is a direct successor for.

    As previously discussed, key features in Spring Framework 3.2 include:

    • Refined Java SE 7 support within the framework as well as through upgrades to CGLIB 3.0, ASM 4.0 (both of which we're inlining now) and AspectJ 1.7
    • Concurrency refinements across the framework, avoiding the use of synchronization wherever possible - in particular for scoped/prototype beans
    • Allowing for @Autowired and @Value to be used as meta-annotations, e.g. to build custom injection annotations in combination with specific qualifiers
    • Support for custom @Bean definition annotations in @Configuration classes, e.g. in combination with specific qualifiers, @Lazy, @Primary, etc
    • Asynchronous MVC processing on Servlet 3.0

    This Week in Spring - 11 December, 2012

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

    Welcome to another installment of This Week in Spring! We finished SpringOne China over the weekend and are today at the first of two events for SpringOne India in Bangalore and SpringOne in Hyderabad. The shows have been really amazing! In particular, we've enjoyed the food, the sites and the amazing community that have turned up in droves!

    An attendee took a shot of me as I was giving a talk on Spring on Cloud Foundry Dr. Mark Pollack, myself, Gary Russell and Chris Richardson at a restaurant in Beijing
    I gave a talk in Bangalore and people deluged the stage with questions and greetings. I asked the last wave of people to take a photo with me. LtoR: Gary Russel, Josh Long, Jennifer Hickey, Jeremy Grelle, Oliver Gierke, Chris Richardson -- the whole SpringOne India lineup

     

      <LI> Roy Clarkson has announced <a href = "http://www.springsource.org/spring-android/news/1.0.1-released">Spring for Android 1.0</a>, which     adds support for Jackson 2.x in <code>RestTemplate</code> through the new <code>MappingJackson2HttpMessageConverter</code>. It also addresses several bugs and compatibility issues with <code>RestTemplate</code> and Android Jelly Bean.</LI>
      <LI>The <a href="http://www.tomcatexpert.com">TomcatExpert.com portal</a> has a nice post on Spring Insight Developer to analyze code, <a href="http://www.springsource.org/node/3761">install it with Tomcat, and…

      Introducing Spring Scala

      Engineering | Arjen Poutsma | December 10, 2012 | ...

      Last October, at SpringOne2GX, I introduced the Spring Scala project to the world. Since then, I've also presented this project at Devoxx. In this blog post, I would like to give further details about this project and how you can use it in your Scala projects.

      Why Spring Scala?

      The goal of the Spring Scala project is simply to make it easier to use the Spring framework in Scala. We believe that there are many Spring users out there who want to try Scala out, but do not want to leave their experience with Spring behind. This project is meant for those people.

      Obviously, you can use the (Java) Spring Framework in Scala today, without Spring Scala. But doing so will be awkward in certain places. Just like any programming language, Scala has its own, different way of doing things, and using a pure Java framework like Spring in Scala will just feel "too Java-esque". Spring Scala tries to fix…

      IOC + Javascript at SpringOne 2GX

      Engineering | John Hann | December 06, 2012 | ...

      by Brian CavalierJohn Hann

      We gave a talk on IOC + Javascript at SpringOne 2GX. Front-end web application architecture seemed to be quite a hot topic at the conference, in general, and our talk seemed to be very well received. Here are the video and slides from the talk.

      We'll also be starting a blog series about architectural patterns for modern Javascript web apps, featuring posts from members of SpringSource's new front-end architecture team, S2JS. The posts will expand on the concepts presented in our talk, as well as those presented by Scott Andrews and Jeremy Grelle in their talks.

      The first post in the series is coming next week. Until then, we hope you enjoy the video and the slides.  If you'd like to get a head start, you can browse the demo app's source code

      This Week in Spring - December 4th, 2012

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

      Wow guys! December 4th already! Time sure flies when you're having fun!

      Welcome back to another installment of <EM>This Week in Spring</EM>. This week, I'm in Beijing for <a href="http://springonechina.cloudfoundry.com">SpringOne China</a> and, next week, I'm off to India for <A href="http://springoneindia.cloudfoundry.com/">SpringOne India</a>. If you're in Beijing, Bangalore or Hyderabad, I'd love to see you at these events!
      

      Alright, let's get on with this week's roundup!

      1. Mark Fisher gets the ball rolling this week with a very nice present: Spring Integration 2.2.0.GA has been released! The new release is well described in the blogs on the various new features referenced in the release announcement, so be sure to check it out!
        	</LI>
        <LI>Martin Lippert's announced that the <a href="http://www.springsource.org/node/3757">Spring Tool Suite and Groovy Tool Suite 3.2.0.M1 have been released!</a> </li>
        
         <LI> Tobias…

      This Week in Spring - 27 November, 2012

      Engineering | Josh Long | November 28, 2012 | ...

      Welcome back to another installment of This Week in Spring! If you're in the states, then I hope you're well rested from a hopefully very pleasant holiday weekend, because we've got a lot to cover this week!

      I hope you find this roundup useful. If you should ever want to peruse previous weeks' roundups, we've recently created a This Week in Spring hash tag for the blog archives.

      Anyway, we've got a lot to cover this week, so let's get on with it!

      1. Chris Beams has announced that the Spring Framework 3.2 RC2 has been released, consisting largely of bugfixes and refactoring as the project nears GA.
      2. Andy Wilkinson has announced the release and availability of the Spring Migration Analyzer, a command-line utility that analyzes enterprise Java applications and produces a report describing the application and how it can be migrated to Spring. Input an EAR file, get a migration effort report. It supports WebLogic, WebSphere, Java EE and JBoss in the milestone release, but we are looking for community support to make it better for GA!
      3. Catch the latest in the Spring Data webinar series on Dec 13th -- Data Access and Processing with Spring Data, Hadoop, Batch, Integration. We are also have a webinar on Spring Data Gemfire on Dec 6th: The Data Renaissance: Going in-Memory with VMWare vFabric GemFire 7.0 and Spring.
      4. If you have missed the other webinars in the Spring Data Webinar series, check out the SpringSource Dev Youtube channel for recently published replays on: Data Access with Spring -- Getting the most out of JPA, JDBC and REST and Introducing Spring for Apache Hadoop.
      5. Gary Russell has announced that Spring Integration 2.2.0.RC3 has been released.
      6. Spring Social 1.1.0 has been released. The new release includes easier XML and Java configuration, tighter adherence to the latest OAuth 2 specification drafts, including HTTP Basic client authentication and support for Resource Owner Credentials Grant and Client Credentials Grant, and updates to the Facebook and Twitter API bindings.
      7. Jens Schauder has a nice post on creating new Spring beans on demand using the singleton scope.
      8. The Java How to Program blog has a nice roundup on
          <a href="http://www.hubberspot.com/2012/10/how-to-use-component-annotation-for.html">How to use <CODE>@Component</CODE> 
          annotation to automatically configure Spring beans</a>.
        
      9. This is a nice post on how to implement the chain-of-responsibility pattern using Spring and @Autowired (or alternatively @Inject).
      10. Viral Patel's back at it again, this time with a post on Spring 3 MVC interceptors.
      11. The Mkyong blog has another nice post up on Spring and Java threading example using the Spring thread scope.
      12. DZone has a nice post up on easy integration testing with Spring and the JUnit 4 support.
      13. I recently wrote up a version of a tutorial on getting started with SpringSource Tool Suite and Spring for beginners.

      Get the Spring newsletter

      Thank you for your interest. Someone will get back to you shortly.

      Get ahead

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

      Learn more

      Get support

      Tanzu Spring Runtime 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