Blogs

SpringSource Blog

Spring Framework 3.0 RC2 released

Juergen Hoeller

It is my pleasure to announce that we released the second Spring 3.0 release candidate today (download page). This release introduces key improvements over RC1 in several areas, in particular:

* Spring 3.0 RC2 is fully JSR-330 compliant and passes the final version of the TCK. JSR-330, a.k.a. "Dependency Injection for Java", basically standardizes an @Inject annotation with a qualifier model. The "javax.inject" annotations can now be used as alternative to Spring's own @Autowired and @Qualifier annotations. Spring's <context:annotation-config> element automatically activates JSR-330 processing as well (if the "javax.inject" API is present).

* A dedicated AnnotationConfigApplicationContext: making programmatic bootstrapping as convenient as possible, without any XML involved. Explicit registration of annotated classes is supported as well as component scanning in the classpath. This works fine not only with Spring's @Component model but also with @Configuration classes (a.k.a. "JavaConfig") and JSR-330 compliant classes.

* A new mvc configuration namespace: <mvc:annotation-driven/> activates rich processing of @Controller classes, including support for annotation-driven formatting and annotation-driven validation (if a JSR-303 "Bean Validation" provider such as Hibernate Validator 4.0 is present). The newly revised version of our formatting package also comes with support for the popular Joda Time library.

* Revised lifecycle management at runtime: Auto-starting message listener containers and schedulers will now kick off once context configuration has been fully completed. On context close, a specific shutdown order can be defined for 'phased' stopping of lifecycle components. A configurable LifecycleProcessor delegate provides corresponding customization hooks.

Finally, RC2 comes with many refinements in the details: e.g. revised URI encoding for proper treatment of special characters in any part of the request URL; refined scope handling in parent-child relationships for inheriting a bean's scope; support for load-time weaving on JBoss 5.x; etc.

Spring 3.0 GA is just around the corner now…

P.S.: Special thanks to all the people in the 'extended' Spring developer team – both within and outside of SpringSource – who made this release possible! You rock :-)

Similar Posts

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

17 responses


  1. Great! I switched from RC1 in an small up a few hours ago and it's going all nice so far. I'll probably migrate to the new JSR-330 annotations soon and see how it goes.

    Nice job!


  2. Thanks for the release. Where can i have the JSR-330 API? Any maven repo? Thx.


  3. For Spring 3.0 RC1 I was previously using the org.jboss.spring-int libraries to deploy on jboss 5.1 . I upgraded to RC2, and now none of it works. Any help would be appreciated. I really don't understand why everything has become such a huge mess, on jboss side.


  4. Donny, the JSR 330 API is available in the main Maven repo:

    javax.inject
    javax.inject
    1


  5. Donny, you can get the JSR 330 API at the standard location using

    <dependency>
    <groupId>javax.inject</groupId>
    <artifactId>javax.inject</artifactId>
    <version>1</version>
    </dependency>


  6. Is there a target release date for Spring 3.0?


  7. Spring Framework 3.0 RC2 ,Good!



  8. Thanks Willie!! :D


  9. where is spring3 rc2 maven repository url
    it seem that http://repository.springsource.com/maven/bundles/milestone no longer get it

    thx!!!


  10. Can you please public the Spring 3 RC2 modules in a Maven repository? It's only half of the world that's using Maven.
    I found these S3 repositories but they do not contain all modules (I want to use the spring-web module) and I also think not all dependencies are correct because when I include spring-beans in my project, I do not get the spring-core and spring-context dependencies with it.

    Milestone Repository: http://s3browse.com/explore/maven.springframework.org/milestone
    Snapshot Repository: http://s3browse.com/explore/maven.springframework.org/snapshot

    Tnkx!!


  11. Released? As previous posters said: it's not much of a "release" if it isn't in your milestone repo yet and thus not easily available for inclusion in (test) applications.


  12. The current implementation in Spring3 RC2 is only a subset of the standalone Java-config capabilities (which is stale since 1.0.0M4 in favor of integration with Spring3) . A lot of features, existing in 1.0.0M4 simply do not exist in Spring3 RC2 AnnotationConfigApplicationContext. E.g. – @AspectJAutoProxy, @AnnotationDrivenTx, etc.

    If I am not in error, Release Candidate implies feature-freeze. Does it mean final version of Spring3 AnnotationConfigApplicationContext won't have those critical features?


  13. I'm experimenting with building 3.0.0.RC2 from scratch. Running "ant" and "ant jar package" from projects/build-spring-framework/ works without a hitch.

    I noticed, though, that everything that got built came out with a version of 3.0.0.BUILD-timestamp (where timestamp is in yyyyMMdd… form). This verbose, snapshot-like version would show up in both the JAR names and as the revision in the ivy.xml files that get generated. Instead of this, I wanted to see if I could generate the actual version, 3.0.0.RC2, as the version.

    I tried going to projects/build.properties and changing the version property from 3.0.0 to 3.0.0.RC2, but there's a bundlor Ant task invocation that would complain there was something invalid about that. Also, there's a build.stamp property commented out in build.properties; I tried setting that to an empty string, but a BUILD-timestamp suffix would still get added to the version.

    Can anyone say how to configure the Spring build to produce 3.0.0.RC2 as the actual version?


  14. Following up the earlier comments about not being able to find 3.0.0.RC2 in any Maven repositories, I’m wondering if there are any Ivy repositories out there where I might be able to find 3.0.0.RC2. If so, what are the Ivy settings to use?

    I ran into trouble trying to consume 3.0.0.RC2 at its expected Ivy repository locations according to Spring’s own build. Here’s what I tried.

    I used projects/spring-build/common/ivysettings.xml in the distribution to configure Ivy. I made sure all the stuff in projects/spring-build/lib/ivy/ was in the classpath that created Ivy. Then I tried doing an ivy:resolve on an arbitrary Spring module against the spring-portfolio-lookup resolver. All I got was messages like the following:
    [ivy:resolve] ==== bundle-release-repository: tried
    [ivy:resolve] s3://repository.springsource.com/ivy/bundles/release/org.springframework/org.springframework.context/3.0.0.RC2/ivy-3.0.0.RC2.xml
    [ivy:resolve] ==== bundle-milestone-repository: tried
    [ivy:resolve] s3://repository.springsource.com/ivy/bundles/milestone/org.springframework/org.springframework.context/3.0.0.RC2/ivy-3.0.0.RC2.xml


    [ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
    [ivy:resolve] :: UNRESOLVED DEPENDENCIES ::
    [ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
    [ivy:resolve] :: org.springframework#org.springframework.context;3.0.0.RC2: not found
    [ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::

    Then I figured, even if the Spring modules themselves aren’t at the expected Ivy repositories, surely their third-party dependencies are. Otherwise I wouldn’t have been able to build 3.0.0.RC2 by hand. (See previous message.) So I tried doing an ivy:resolve on an arbitrary third-party module against the external-lookup resolver. What I get is a variation on the same problem:

    [ivy:resolve] ==== bundle-external-repository: tried
    [ivy:resolve] s3://repository.springsource.com/ivy/bundles/external/org.apache.commons/com.springsource.org.apache.commons.logging/1.1.1/ivy-1.1.1
    .xml
    [ivy:resolve] ==== library-external-repository: tried
    [ivy:resolve] s3://repository.springsource.com/ivy/libraries/external/org.apache.commons/com.springsource.org.apache.commons.logging/1.1.1/ivy-1.1
    .1.xml
    [ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
    [ivy:resolve] :: UNRESOLVED DEPENDENCIES ::
    [ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
    [ivy:resolve] :: org.apache.commons#com.springsource.org.apache.commons.logging;1.1.1: not found
    [ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::

    Now, what’s odd to me about this failure is that the same resolve had to be succeeding against the same repositories since I managed to get the Spring build working, and it had to find those modules somewhere.

    Thankfully, I'm able to do some hacks, based on what the Spring build outputs, to be able to consume a reconstituted 3.0.0.RC2 via Ivy. Just, it would be nice if there were a right, recommended way to do this.


  15. Great work!
    Could you get some example or indicate some svn url :) , too?

    Thanx a lot.


  16. Example using @Inject corse :)

9 trackbacks

Leave a Reply