Blogs

SpringSource Blog

Spring Framework 3.0 RC1 released

Juergen Hoeller

I'm pleased to announce that we recently released the first Spring 3.0 release candidate (download page). This release completes the key Spring 3.0 feature set. You certainly remember the original Spring 3.0 themes REST and EL; in the meantime, we have been expanding the list significantly:

* Fully Java 5 based: This is the first Spring generation which requires Java 5 or above, with Java 5 syntax used in the entire Spring API as well as in the entire implementation codebase. For example, the BeanFactory API returns generically typed bean instances wherever possible, and ApplicationListeners may declare a specific event type using generics now. For a comparison: In Spring 2.5, the actual Spring core was still JDK 1.4 compatible, while a lot of higher-level functionality was built on Java 5.

* Spring expression language (SpEL): a core expression parser for use in bean definitions, allowing for references to nested bean structures (e.g. properties of other beans) as well as to environmental data structures (e.g. system property values) through a common #{…} syntax in property values. This also serves as a foundation for various expression-based features across the Spring project portfolio.

* Extended support for annotation-based components: now with the notion of configuration classes and annotated factory methods – the key Java configuration capabilities of the Spring JavaConfig project are finally available in Spring proper! Spring also allows for injecting configuration values through @Value expressions now, referring to configuration settings via dynamic #{…} expressions or static ${…} placeholders.

* Powerful stereotype model: allows for creating 'shortcut' annotations through the use of meta-annotations, e.g. for default scopes and default transactional characteristics on custom stereotypes. Imagine a custom @MyService annotation indicating @Service, @Scope("request") and @Transactional(readOnly=true) through a single annotation. This is the Don’t Repeat Yourself principle applied to the use of component annotations!

* Standardized dependency injection annotations: Spring 3.0 comes with early support for the JSR-330 specification for Dependency Injection in Java – annotation-driven injection via javax.inject.Inject and its associated qualifier and provider model, as an alternative to Spring's own @Autowired and co. Note that JSR-330 has not been finalized yet; we will be completing Spring's javax.inject support as the specification itself matures.

* Declarative model validation based on constraint annotations: Spring-style setup of a JSR-303 Bean Validation provider (such as Hibernate Validator 4.0). Comes with an annotation-driven validation option in Spring MVC, exposing a unified view on constraint violations through Spring’s binding result facility. Note that JSR-303 is near-final but not quite final yet; we will be tracking its ongoing evolution up until GA.

* Enhanced binding and formatting facilities: stateless Converter and Formatter SPIs as an alternative to standard PropertyEditors, with full Spring container and Spring MVC integration. Separates between converting (core type coercion) and formatting (rendering to and parsing from localized String values). Formatting may be driven by annotations in a style similar to the use of JSR-303 constraint annotations.

* Comprehensive REST support: native REST capabilities in Spring MVC, such as REST-style request mappings, URI variable extraction through @PathVariable parameters, and view resolution driven by content negotiation. Think about this as Spring MVC 2.5 with first-class REST capabilities built in now – while still focusing on the MVC approach. Client-side REST support is available in the form of a RestTemplate class.

* Object/XML Mapping (OXM): as known from Spring Web Services, now in Spring Framework core. Marshalling and Unmarshaller abstractions with out-of-the-box support for JAXB 2, Castor, etc. Comes with integration options for XML payload support in Spring MVC and Spring JMS.

* Portlet 2.0 support: Spring MVC fully supports Portlet 2.0 environments and Portlet 2.0’s new event and resource request model. Includes specialized mapping facilities for typical portlet request characteristics: @ActionMapping, @RenderMapping, @ResourceMapping, @EventMapping.

* Next-generation scheduling capabilities: new TaskScheduler and Trigger mechanisms with first-class cron support, aligned with Spring's TaskExecutor mechanism. Spring 3.0 comes with a convenient task namespace and also supports @Async and @Scheduled annotations now. This can be executed on top of native thread pools or server-managed thread pools, with support for all major Java EE application servers.

* Last but not least, early support for Java EE 6: Spring 3.0 already supports the use of JSF 2.0 and JPA 2.0 in a Spring environment, in addition to JSR-303 and JSR-330 support. Further Java EE 6 related specifications such as Servlet 3.0 will be fully supported as they become available in concrete products; this is scheduled for the Spring 3.1/3.2 timeframe.

Of particular significance in the RC1 release are the above mentioned "3-0" specifications JSR-330 and JSR-303; we are going to elaborate on Spring's support for those specs in follow-up posts. For the time being, check out the revised section on annotation-based configuration and the new chapter on declarative validation. You might also be interested in Spring's new formatting features: annotation-driven field formatting.

P.S.: On top of the key feature set in RC1, we are considering several minor enhancements for inclusion in the upcoming 3.0 RC2: for example, a web namespace for formatting and validation setup with Spring MVC. 3.0 RC2 is scheduled for mid October; its primary focus is on compatibility improvements as well as on runtime optimizations. Stay tuned!

Similar Posts

Share this Post
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • DZone
  • LinkedIn
  • Slashdot
  • Technorati
  • Twitter
 

27 responses


  1. Great, thanks! I would really appreciate example on each item from this list since new features in Spring are great but suffer with insufficient number of examples.


  2. Great to see RC1! We already switched to 3.0 several months ago, and the milestones were extremely stable, this is a real proof of Spring's codebase high internal quality. BTW: any chance to have SPR-5943 added into RC2?


  3. Will Spring 3.x be an implementation of JSR 299 now that it uses JSR 330 annotations?


  4. Any chances JAX-RS support showing up in the new Spring MVC REST feature?


  5. Nice work guys!

    One question though:
    How backwards compatible is Spring 3.0 with previous Spring releases? Bean definition wise I suppose 100% (or close to that), but what about the Java level (source binary)?


  6. That sounds really good! Really looking forward for 3.0! Any chance that you can put the RC1 to your Enterprise Bundle Repository at http://www.springsource.com/repository/app/?

    That would simplify downloading 3.0 RC1 together with all its new dependencies a lot. Thanks!


  7. Great !!! i was waiting for portlet 2.0 support in spring framework..

    thanks..


  8. Hi

    Sub : Tech Blog Link Request – http://www.adamsinfo.com

    For leveraging traffic from the internet, I have manually collected a list of quality blogs and sites with whom I am interested in getting associated.

    I liked your Site/blog and i'm interested in having my blog's text link in your blog roll.

    Please let me know your interest in this association and then we can move towards next step.

    Sincerely,

    Webmaster
    Adamsinfo.com
    seo@apnicsolutions.com


  9. @Klaus

    Although it does not show in the web index, RC1 with all other milestones are published in the same way as regular releases. The only difference is that they are published to a separate repository. You will need to replace "release" with "milestone" in the repository settings.

    For Ivy:
    http://www.springsource.com/repository/app/faq#q7

    For Maven:
    http://www.springsource.com/repository/app/faq#q8


  10. I'm getting this exception when running a Spring MVC Controller with JSR303 validation as explained in the docs –

    javax.validation.ValidationException: Unable to find a default provider

    Where can I get the default provider from. I mean the maven dependency for the default JSR303 provider.

    ==========================

    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.bind.support.ConfigurableWebBindingInitializer#1ce5e7a' defined in ServletContext resource [/WEB-INF/hellospring-servlet.xml]: Cannot resolve reference to bean 'validator' while setting bean property 'validator'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validator' defined in ServletContext resource [/WEB-INF/hellospring-servlet.xml]: Invocation of init method failed; nested exception is javax.validation.ValidationException: Unable to find a default provider
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)


  11. Cool stuff!

    I like using annotations a lot over xml configs, and of course default values are great.
    REST support is also important to me. For that I now use Jersey (jersey.dev.java.net), an implementation of JAX-RS. As Julio asks, what about support for JAX-RS?

    dirk


  12. Great job, I am really looking forward Portlet 2.0 support in Spring, but I checked the documentation ant it still says that only jsr168 (Portlet 1.0) is supported (http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/ch18.html). Is there any timeline about updating the documentation mainly the section about Spring Portlet MVC?

    Standa Brand


  13. @John

    Please report the problem on the Spring tracker with your code and exception so we can track it down in the next release.

    Thanks,


  14. John,

    The default validation provider should be Hibernate Validator 4.0. Please check for the availability of the latest betas there in Maven according to the Hibernate website… We'll make sure to mention it in our documentation once Hibernate Validator goes final.

    Standa,

    The Portlet chapter is outdated there. I hope we'll be able to update it for Portlet 2.0 in time for our GA release.

    Juergen


  15. It would be great to have some more information on the sterotype model for shortcut annotations.


  16. Good job, 3.0 is finally getting closer. Earlier this year there was talk that 3.0 would have some kind of support for conversations and conversation-scoped EntityManagers similar to Seam – is this still on the agenda?


  17. Elınıze saglık guzel paylasım…


  18. Thanks Juergen for the great accomplishment. In one of the presentations you had earlier this year, you mentioned that conversation management would be a part of the spring mvc. Is that still the case? Thank you.

    Khue


  19. In short some excellent info is provided here…I like using annotations a lot over xml configs, and of course default values are great.


  20. I'm impressed that you provide 60-day eval's. Fully-functioning eval software is the best way to get your product into people's hands so they can learn to use it.


  21. I saw that you've done some early work with Google Android OS. Are you working to have something ready when Google rolls out their web-based OS for PC's?


  22. old memories XD


  23. Excellent information! I found the site very easy to use, and the information just enough to send me out to do further research. Please keep up the good work. I am recommending this site to all my friends that are in the same ov wt boat!


  24. Thanks,

    Nice to know about


  25. Recently be interested in Spring Data MongoDB 1.0 Milestone 5, which looks very promising.

    Thanks,
    Stanley @ Recycle City


  26. hermes birkin》》http://www.discounthermesbirkinoutlet.com/

    hermes birkin bag》》http://www.discounthermesbirkinoutlet.com/hermes-birkin-10

    birkin hermes》》http://www.discounthermesbirkinoutlet.com/hermes-birkin-tote-bag-peach-25cm-108.html nuj25sto


  27. What i don't understood is actually how you are not actually much more well-liked than you may be nowYou're very intelligentYou realize therefore considerably relating to this subject, produced me personally consider it from so many varied anglesIts like men and women aren't fascinated unless it�s one thing to accomplish with Lady gaga! Your own stuffs greatAlways maintain it up!

12 trackbacks

Leave a Reply