1. Overview of New Features

Spring Framework 3.0 incorporates significant changes. This guide describes changes to the Spring Framework and issues you might encounter when you upgrade to Spring Framework 3.0.

The most notable change is the upgrade to Java 5 or later. This upgrade does alter the API by introducing generics and varargs, but Spring 3.0 provides backwards compatibility to the extent possible.

Spring 3.0 incorporates consistent use of generic Collections and Maps, consistent use of generic FactoryBeans, and consistent resolution of bridge methods in the Spring AOP API. Generic ApplicationListeners automatically receive specific event types only. All callback interfaces such as TransactionCallback and HibernateCallback now declare a generic result value Overall, the Spring core code base is now freshly revised and optimized for Java 5.

Spring's TaskExecutor abstraction is updated for close integration with Java 5's java.util.concurrent facilities. We provide first-class support for Callables and Futures now, as well as ExecutorService adapters, ThreadFactory integration, and so on. This support is aligned with JSR-236 (Concurrency Utilities for Java EE 6) as much as possible. Spring 3.0 supports asynchronous method invocations through the new @Async annotation (or EJB 3.1's @Asynchronous annotation). There is also a new @Scheduled annotation that marks a method to be scheduled.

The new Spring expression language (SpEL) allows you to use references to nested bean structures (for example, properties of other beans) as well as to environmental data structures, such as system property values, through a common #{…} syntax in property values.

See Spring Framework Reference and the rest of this guide for information about more new features that you may want to use after you upgrade to Spring 3.0.