Pages

February 17, 2011

New features for Spring 3.0

This is a list of some new features for Spring 3.0:
  • Support for Java EE 6: JPA2, JSF2, EJB3.1...
  • Core APIs updated for Java 5: typed bean instances returned
    T getBean(Class<T> requiredType)
  • Support embedded database:  Support for embedded Java database engines provides by the org.springframework.jdbc.datasource.embedded package (hsql, h2...).
  • New features from JavaConfig: Some core features from the JavaConfig project have been added to the Spring Framework.
  • 
    @Configuration
    public class AppConfig {
    
        private
        @Value("#{jdbcProperties.url}")
        String url;
        private
        @Value("#{jdbcProperties.username}")
        String username;
        private
        @Value("#{jdbcProperties.password}")
        String password;
    
        /**
         * ........
         * some code here
         * ........
         */
        @Bean
        public DataSource dataSource() {
            return new DriverManagerDataSource(url, username, password);
        }
    }
    
    
    The properties file is declared into application context xml file
    
    <util:properties id="jdbcProperties" location="/WEB-INF/jdbc.properties"/>
    
    
  • Object to XML mapping: Moved from Spring web services to Spring core (package org.springframework.oxm).
You can see how integrating Spring Security 3 with Extjs here
References: http://www.springsource.org/documentation

2 comments: