Mock tests, Interview questions, Tutorials and Tech news
 
 

Archive

Posts Tagged ‘spring 3.0 new features’

Spring Framework 3.0 M3 released

June 25th, 2009 Vinay 1 comment

Spring team has released 3.0 version of their popular Spring source framework. This is a third major release  after 2.0 and 2.5 .

What are the new features in Spring 3.0?

1. The Spring Framework is now based on Java 5, and Java 6 is fully supported.

2. The entire framework code has been revised to take advantage of Java 5 features like generics, varargs and other language improvements.  The code is still compatible with older versions of Java

3. Spring Expression Language – Spring has introduced an expression language which is similar to Unified EL in its syntax but offers significantly more features

The following is an example of how the Expression Language can be used to configure some properties of a database setup

<bean class=“mycompany.RewardsTestDatabase”> <property name=“databaseName” value=“#{systemProperties.databaseName}”/> <property name=“keyGenerator” value=“#{strategyBean.databaseKeyGenerator}”/> </bean>

4. Some core features from the JavaConfig project have been added to the Spring Framework now. This means that the following annotations are now directly supported:

  • @Configuration
  • @Bean
  • @Primary
  • @Lazy
  • @Import
  • @Value

5. Additional annotations such as @CookieValue and @RequestHeaders have been added

6. Early support for asynchronous method invocations through the use of the new @Async annotation (or EJB 3.1’s @Asynchronous annotation).

7. The most exciting new feature for the Web Tier is the support for building RESTful web services and web applications

8. Object to XML mapping functionality (OXM) from the Spring Web Services project has been moved to the core Spring Framework now

9. Extended support for meta-annotations: Spring’s @Scope and @Transactional annotations, as well as specialized stereotypes such as @Service and @Controller, can be applied as meta-annotations on custom annotations now. for eg

@Service
@Scope(“request”)
@Transactional(rollbackFor=Exception.class)

@Retention(RetentionPolicy.RUNTIME)
public @interface MyService {
}@MyService
public class RewardsService {

}

Source :  Spring 3.0 documentation

Get Adobe Flash playerPlugin by wpburn.com wordpress themes