0% found this document useful (0 votes)
48 views

New Features and Enhancements in Spring 3.0: 2.1 Java 5

Spring 3.0 introduced several new features and enhancements including improved support for Java 5 and 6, a new module organization and build system, and a Spring Expression Language. It also included updates to core APIs to take advantage of Java 5 features like generics.

Uploaded by

vidhyaa1011
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

New Features and Enhancements in Spring 3.0: 2.1 Java 5

Spring 3.0 introduced several new features and enhancements including improved support for Java 5 and 6, a new module organization and build system, and a Spring Expression Language. It also included updates to core APIs to take advantage of Java 5 features like generics.

Uploaded by

vidhyaa1011
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

2.

New Features and Enhancements in Spring


3.0
If you have been using the Spring Framework for some time, you will be aware that Spring has
undergone
two major revisions: Spring 2.0, released in October 2006, and Spring 2.5, released in November
2007. It
is now time for a third overhaul resulting in Spring 3.0.
Java SE and Java EE Support
The Spring Framework is now based on Java 5, and Java 6 is fully supported.
Furthermore, Spring is compatible with J2EE 1.4 and Java EE 5, while at the same time introducing
some early support for Java EE 6.

2.1 Java 5
The entire framework code has been revised to take advantage of Java 5 features like generics, varargs
and other language improvements. We have done our best to still keep the code backwards
compatible.
We now have consistent use of generic Collections and Maps, consistent use of generic FactoryBeans,
and also 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 declare a generic result value now. Overall, the Spring core codebase is now
freshly
revised and optimized for Java 5.
Spring's TaskExecutor abstraction has been 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, etc. This has been aligned with JSR-236 (Concurrency Utilities
for
Java EE 6) as far as possible. Furthermore, we provide support for asynchronous method invocations
through the use of the new @Async annotation (or EJB 3.1's @Asynchronous annotation).

2.2 Improved documentation


The Spring reference documentation has also substantially been updated to reflect all of the changes
and
new features for Spring 3.0. While every effort has been made to ensure that there are no errors in this
documentation, some errors may nevertheless have crept in. If you do spot any typos or even more
serious
errors, and you can spare a few cycles during lunch, please do bring the error to the attention of the
Spring team by raising an issue.

2.3 New getting started tutorial


Spring Framework
3.0 Reference Documentation 19
There is now a new getting started tutorial for developing a basic Spring 3.0 MVC web application.
This
tutorial is a separate document that can be found at the Spring Documentation page.

2.4 New module organization and build system


The framework modules have been revised and are now managed separately with one source-tree per
module jar:
org.springframework.aop
org.springframework.beans
org.springframework.context
org.springframework.context.support

org.springframework.expression
org.springframework.instrument
org.springframework.jdbc
org.springframework.jms
org.springframework.orm
org.springframework.oxm
org.springframework.test
org.springframework.transaction
org.springframework.web
org.springframework.web.portlet
org.springframework.web.servlet
org.springframework.web.struts
Note:
The spring.jar artifact that contained almost the entire framework is no longer provided.
We are now using a new Spring build system as known from Spring Web Flow 2.0. This gives us:
Spring Framework
3.0 Reference Documentation 20
Ivy-based "Spring Build" system
consistent deployment procedure
consistent dependency management
consistent generation of OSGi manifests

2.5 Overview of new features


This is a list of new features for Spring 3.0. We will cover these features in more detail later in this
section.
Spring Expression Language
IoC enhancements/Java based bean metadata
General-purpose type conversion system and field formatting system
Object to XML mapping functionality (OXM) moved from Spring Web Services project
Comprehensive REST support
@MVC additions
Declarative model validation
Early support for Java EE 6
Embedded database support

Core APIs updated for Java 5


BeanFactory interface returns typed bean instances as far as possible:
T getBean(Class<T> requiredType)
T getBean(String name, Class<T> requiredType)
Map<String, T> getBeansOfType(Class<T> type)
Spring's TaskExecutor interface now extends java.util.concurrent.Executor:
extended AsyncTaskExecutor supports standard Callables with Futures
New Java 5 based converter API and SPI:

You might also like