SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Downloaden Sie, um offline zu lesen
What’s coming in Spring 3.0


              Matt Raible
      Colorado Software Summit 2008
          http://www.linkedin.com/in/mraible
Agenda

• Introductions
• Spring History
• Spring Overview
• Choose Your Own Adventure
• Q and A
Introductions

 • Your experience with Spring?
 • Your experience with Java and J2EE?
 • What do you hope to learn today?
 • Open Source experience: Ant, Maven,
   Eclipse, Hibernate, Tomcat, JBoss?
 • Favorite IDE? Favorite OS?
Who is Matt Raible?
• Java Blogger since 2002
• Power user of Java Frameworks
• Author of Spring Live and Pro JSP 2.0
• Founder of AppFuse (http://appfuse.org)
• Lead UI Architect at LinkedIn
• Father, Skier, Cyclist and Beer Connoisseur
• http://www.linkedin.com/in/mraible
The Spring Framework


• Simplify J2EE
• Manage Dependencies
• Inversion of Control
• À la carte framework
Spring Mission Statement
Spring Modules
Spring Portfolio
Past Releases

 • March 24, 2004 - Spring 1.0
 • October 5, 2006 - Spring 2.0
 • November 19, 2007 - Spring 2.5
 • January 2009 - Spring 3.0
3.0 Release Schedule

• 3.0 M1 scheduled for September 2008
• 3.0 RC1 scheduled for December 2008
• 3.0 Final in January 2009
New in Spring 2.5
• Extended Platform Support
 • Java SE 6, Java EE 5 and OSGi
• Enhanced AspectJ support
• Comprehensive support for Annotations
 • Bean lifecycle
 • Autowiring
 • Spring MVC enhancements
Annotation Examples
@Repository(value = quot;userDaoquot;)
public class UserDaoHibernate implements UserDao {
    HibernateTemplate hibernateTemplate;

    @Autowired
    public UserDaoHibernate(SessionFactory sessionFactory) {
        this.hibernateTemplate = new HibernateTemplate(sessionFactory);
    }

    public List getUsers() {
        return hibernateTemplate.find(quot;from Userquot;);
    }

    @Transactional
    public void saveUser(User user) {
        hibernateTemplate.saveOrUpdate(user);
    }
}
                           @Service(value = quot;userManagerquot;)
                           public class UserManagerImpl implements UserManager {
                               @Autowired UserDao dao;

                               public List getUsers() {
                                   return dao.getUsers();
                               }
                           }
Annotation Examples
@Repository(value = quot;userDaoquot;)
public class UserDaoHibernate implements UserDao {
    HibernateTemplate hibernateTemplate;

    @Autowired
    public UserDaoHibernate(SessionFactory sessionFactory) {
        this.hibernateTemplate = new HibernateTemplate(sessionFactory);
    }

    public List getUsers() {
        return hibernateTemplate.find(quot;from Userquot;);
    }

    @Transactional
    public void saveUser(User user) {
        hibernateTemplate.saveOrUpdate(user);
    }
}
                           @Service(value = quot;userManagerquot;)
                           public class UserManagerImpl implements UserManager {
                               @Autowired UserDao dao;

                               public List getUsers() {
                                   return dao.getUsers();
                               }
                           }
XML Configuration
Annotation Scanning
<!-- Replaces ${...} placeholders with values from a properties file -->
<!-- (in this case, JDBC-related settings for the dataSource definition below) -->
<context:property-placeholder location=quot;classpath:jdbc.propertiesquot;/>

<!-- Enable @Transactional support -->
<tx:annotation-driven/>

<!-- Enable @AspectJ support -->
<aop:aspectj-autoproxy/>

<!-- Scans for @Repository, @Service and @Component -->
<context:component-scan base-package=quot;org.appfusequot;/>
XML Configuration
Declarative Transactions

 <aop:config>
     <aop:advisor id=quot;managerTxquot; advice-ref=quot;txAdvicequot;
                  pointcut=quot;execution(* *..service.*Manager.*(..))quot;/>
 </aop:config>

 <tx:advice id=quot;txAdvicequot;>
     <tx:attributes>
         <tx:method name=quot;get*quot; read-only=quot;truequot;/>
         <tx:method name=quot;*quot;/>
     </tx:attributes>
 </tx:advice>
Testing
    package org.appfuse.service;

    import   org.appfuse.model.User;
    import   static org.junit.Assert.*;
    import   org.junit.Test;
    import   org.junit.runner.RunWith;
    import   org.springframework.beans.factory.annotation.Autowired;
    import   org.springframework.test.context.ContextConfiguration;
    import   org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
    import   org.springframework.transaction.annotation.Transactional;

    @RunWith(SpringJUnit4ClassRunner.class)
    @ContextConfiguration
    public class UserManagerTest {
        @Autowired
        UserManager userManager;

        @Test
        @Transactional
        public void testGetUsers() {

        }
    }
Spring MVC Improvements
 @Controller
 public class UserController {
     @Autowired
     UserManager userManager;

      @RequestMapping(quot;/usersquot;)
      public String execute(ModelMap model) {
          model.addAttribute(userManager.getUsers());
          return quot;userListquot;;
      }
 }

     <!-- Activates mapping of @Controller -->
     <context:component-scan base-package=quot;org.appfuse.webquot;/>

     <!-- Activates @Autowired for Controllers -->
     <context:annotation-config/>

     <!-- View Resolver for JSPs -->
     <bean id=quot;viewResolverquot;
         class=quot;org.springframework.web.servlet.view.InternalResourceViewResolverquot;>
         <property name=quot;viewClassquot;
                   value=quot;org.springframework.web.servlet.view.JstlViewquot;/>
         <property name=quot;prefixquot; value=quot;/quot;/>
         <property name=quot;suffixquot; value=quot;.jspquot;/>
     </bean>
ModelMap Naming


• Automatically generates a key name
 • o.a.m.User ➟ ‘user’
 • java.util.HashMap ➟ ‘hashMap’
 • o.a.m.User[] ➟ ‘userList’
 • ArrayList, HashSet ➟ ‘userList’
@RequestMapping

• Methods with @RequestMapping are
  allowed very flexible signatures
• Arguments supported:
 • ServletRequest and ServletResponse
 • HttpSession
 • Locale
 • ModelMap
 • http://is.gd/2wly
Spring 2.0 ➟ 2.5
Spring Annotations

http://refcardz.dzone.com/refcardz/spring-annotations
Other Spring Technologies
• Spring Security 2.x with OpenID Support
• Spring Web Flow 2.x
• Spring Remoting (HttpInvoker)
• Spring Web Services
• Spring Batch
• Spring Dynamic Modules
• SpringSource Application Platform
New in Spring 3.0
• Java 5+
• Spring Expression Language
• New Spring MVC Features
 • REST
 • Ajax
 • Declarative Validation
• Backwards compatible with Spring 2.5
Spring Expression Language
• Unified EL++
 • Deferred evaluation of expressions
 • Support for expressions that can set
    values and invoke methods
  • Pluggable API for resolving Expressions
  • Unified EL Reference: http://is.gd/2xqF
  • Spring 3.0 allows usage in XML files and
    @Value annotations
REST Support
               http://infoq.com/articles/rest-introduction
REST with @PathParam

   http://myserver/myapp/show/123

   @RequestMapping(method = RequestMethod.GET)
   public User show(@PathParam Long id) {
   	 return userManager.getUser(id);
   }
REST with RestController
@Controller
public class ResumesController implements RestController<Resume, Long> {
	
	   GET http://myserver/myapp/resumes
	   public List<Resume> index() {}

	   POST http://myserver/myapp/resumes
	   public void create(Resume resume) {}

	   GET http://myserver/myapp/resumes/1
	   public Resume show(Long id) {}

	   DELETE http://myserver/myapp/resumes/1
	   public void delete(Long id) {}

	   PUT http://myserver/myapp/resumes/1
	   public void update(Resume resume) {}
}
JAX-RS Annotations

• JAX-RS: Java API for RESTful Web Services
 • http://jcp.org/en/jsr/detail?id=311
 • http://www.infoq.com/news/2008/10/jaxrs-
    comparison
• @Path, @GET, @PUT, @POST, @DELETE
• @DefaultValue, @PathParam,
  @QueryParam
Dropping Support For...

• Commons Attributes
• TopLink (EclipseLink instead)
• MVC Controller hierarchy
• JUnit 3.8 Test classes
      import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests;

      public class UserManagerTest extends AbstractTransactionalDataSourceSpringContextTests {
          private UserManager userManager;

         public void setUserManager(UserManager userManager) {
             this.userManager = userManager;
         }

         protected String[] getConfigLocations() {
             setAutowireMode(AUTOWIRE_BY_NAME);
             return new String[] {quot;classpath*:/WEB-INF/applicationContext*.xmlquot;};
         }

         protected void onSetUpInTransaction() throws Exception {
             deleteFromTables(new String[] {quot;app_userquot;});
         }
2.5 Community Feedback

• Most common requests for Spring MVC:
 • Add REST Support
 • Add EL Support
 • Add Conversation Support
• 3.0 Targeted Issues:
 • http://snurl.com/3ob7o
Choose Your Own Adventure

• Create a new Spring 3.0 Application with JPA
  and Spring MVC
• Upgrade an existing Spring 2.0 Application to
  Spring 3.0
Get the Source




  http://raibledesigns.com/rd/entry/the_colorado_software_summit_and
Spring 3.0 Kickstart
      http://spring-kickstart.googlecode.com
Spring 2.0 ➟ 3.0
Questions?


matt@raibledesigns.com
http://raibledesigns.com
http://twitter.com/mraible
Download Presentation
 http://raibledesigns.com/rd/page/publications

Weitere ähnliche Inhalte

Was ist angesagt?

Developing ASP.NET Applications Using the Model View Controller Pattern
Developing ASP.NET Applications Using the Model View Controller PatternDeveloping ASP.NET Applications Using the Model View Controller Pattern
Developing ASP.NET Applications Using the Model View Controller Patterngoodfriday
 
ASP.NET MVC 4 - Routing Internals
ASP.NET MVC 4 - Routing InternalsASP.NET MVC 4 - Routing Internals
ASP.NET MVC 4 - Routing InternalsLukasz Lysik
 
Advanced Dagger talk from 360andev
Advanced Dagger talk from 360andevAdvanced Dagger talk from 360andev
Advanced Dagger talk from 360andevMike Nakhimovich
 
Switch to React.js from AngularJS developer
Switch to React.js from AngularJS developerSwitch to React.js from AngularJS developer
Switch to React.js from AngularJS developerEugene Zharkov
 
20150516 modern web_conf_tw
20150516 modern web_conf_tw20150516 modern web_conf_tw
20150516 modern web_conf_twTse-Ching Ho
 
Spring 4 advanced final_xtr_presentation
Spring 4 advanced final_xtr_presentationSpring 4 advanced final_xtr_presentation
Spring 4 advanced final_xtr_presentationsourabh aggarwal
 
Workshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideWorkshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideVisual Engineering
 
50 new features of Java EE 7 in 50 minutes
50 new features of Java EE 7 in 50 minutes50 new features of Java EE 7 in 50 minutes
50 new features of Java EE 7 in 50 minutesAntonio Goncalves
 
Intro to Retrofit 2 and RxJava2
Intro to Retrofit 2 and RxJava2Intro to Retrofit 2 and RxJava2
Intro to Retrofit 2 and RxJava2Fabio Collini
 
Practical Protocol-Oriented-Programming
Practical Protocol-Oriented-ProgrammingPractical Protocol-Oriented-Programming
Practical Protocol-Oriented-ProgrammingNatasha Murashev
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsJeff Durta
 
Basic Tutorial of React for Programmers
Basic Tutorial of React for ProgrammersBasic Tutorial of React for Programmers
Basic Tutorial of React for ProgrammersDavid Rodenas
 
Spring 4 final xtr_presentation
Spring 4 final xtr_presentationSpring 4 final xtr_presentation
Spring 4 final xtr_presentationsourabh aggarwal
 
Lecture 5 JSTL, custom tags, maven
Lecture 5   JSTL, custom tags, mavenLecture 5   JSTL, custom tags, maven
Lecture 5 JSTL, custom tags, mavenFahad Golra
 

Was ist angesagt? (20)

Spring annotation
Spring annotationSpring annotation
Spring annotation
 
Jsp presentation
Jsp presentationJsp presentation
Jsp presentation
 
Data Access with JDBC
Data Access with JDBCData Access with JDBC
Data Access with JDBC
 
Grails Advanced
Grails Advanced Grails Advanced
Grails Advanced
 
Developing ASP.NET Applications Using the Model View Controller Pattern
Developing ASP.NET Applications Using the Model View Controller PatternDeveloping ASP.NET Applications Using the Model View Controller Pattern
Developing ASP.NET Applications Using the Model View Controller Pattern
 
ASP.NET MVC 4 - Routing Internals
ASP.NET MVC 4 - Routing InternalsASP.NET MVC 4 - Routing Internals
ASP.NET MVC 4 - Routing Internals
 
Advanced Dagger talk from 360andev
Advanced Dagger talk from 360andevAdvanced Dagger talk from 360andev
Advanced Dagger talk from 360andev
 
Java Server Pages
Java Server PagesJava Server Pages
Java Server Pages
 
Switch to React.js from AngularJS developer
Switch to React.js from AngularJS developerSwitch to React.js from AngularJS developer
Switch to React.js from AngularJS developer
 
Spring Web MVC
Spring Web MVCSpring Web MVC
Spring Web MVC
 
20150516 modern web_conf_tw
20150516 modern web_conf_tw20150516 modern web_conf_tw
20150516 modern web_conf_tw
 
Spring 4 advanced final_xtr_presentation
Spring 4 advanced final_xtr_presentationSpring 4 advanced final_xtr_presentation
Spring 4 advanced final_xtr_presentation
 
Workshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideWorkshop 26: React Native - The Native Side
Workshop 26: React Native - The Native Side
 
50 new features of Java EE 7 in 50 minutes
50 new features of Java EE 7 in 50 minutes50 new features of Java EE 7 in 50 minutes
50 new features of Java EE 7 in 50 minutes
 
Intro to Retrofit 2 and RxJava2
Intro to Retrofit 2 and RxJava2Intro to Retrofit 2 and RxJava2
Intro to Retrofit 2 and RxJava2
 
Practical Protocol-Oriented-Programming
Practical Protocol-Oriented-ProgrammingPractical Protocol-Oriented-Programming
Practical Protocol-Oriented-Programming
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applications
 
Basic Tutorial of React for Programmers
Basic Tutorial of React for ProgrammersBasic Tutorial of React for Programmers
Basic Tutorial of React for Programmers
 
Spring 4 final xtr_presentation
Spring 4 final xtr_presentationSpring 4 final xtr_presentation
Spring 4 final xtr_presentation
 
Lecture 5 JSTL, custom tags, maven
Lecture 5   JSTL, custom tags, mavenLecture 5   JSTL, custom tags, maven
Lecture 5 JSTL, custom tags, maven
 

Ähnlich wie What's Coming in Spring 3.0

Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2Matt Raible
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentationipolevoy
 
ASP.NET MVC introduction
ASP.NET MVC introductionASP.NET MVC introduction
ASP.NET MVC introductionTomi Juhola
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)Carles Farré
 
DWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A TutorialDWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A Tutorialjbarciauskas
 
Introducing Struts 2
Introducing Struts 2Introducing Struts 2
Introducing Struts 2wiradikusuma
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Phpfunkatron
 
Asp.Net Mvc
Asp.Net MvcAsp.Net Mvc
Asp.Net Mvcmicham
 
Introduction To ASP.NET MVC
Introduction To ASP.NET MVCIntroduction To ASP.NET MVC
Introduction To ASP.NET MVCAlan Dean
 
Annotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVCAnnotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVCJohn Lewis
 
Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSFSoftServe
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet Sagar Nakul
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet Sagar Nakul
 
Struts2
Struts2Struts2
Struts2yuvalb
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to javaciklum_ods
 

Ähnlich wie What's Coming in Spring 3.0 (20)

Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
 
ASP.NET MVC introduction
ASP.NET MVC introductionASP.NET MVC introduction
ASP.NET MVC introduction
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
 
DWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A TutorialDWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A Tutorial
 
Retrofitting
RetrofittingRetrofitting
Retrofitting
 
Jsf Ajax
Jsf AjaxJsf Ajax
Jsf Ajax
 
Introducing Struts 2
Introducing Struts 2Introducing Struts 2
Introducing Struts 2
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Php
 
Asp.Net Mvc
Asp.Net MvcAsp.Net Mvc
Asp.Net Mvc
 
Introduction To ASP.NET MVC
Introduction To ASP.NET MVCIntroduction To ASP.NET MVC
Introduction To ASP.NET MVC
 
Codemotion appengine
Codemotion appengineCodemotion appengine
Codemotion appengine
 
Spine.js
Spine.jsSpine.js
Spine.js
 
Annotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVCAnnotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVC
 
Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSF
 
Struts,Jsp,Servlet
Struts,Jsp,ServletStruts,Jsp,Servlet
Struts,Jsp,Servlet
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
 
Struts2
Struts2Struts2
Struts2
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to java
 

Mehr von Matt Raible

Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022Matt Raible
 
Micro Frontends for Java Microservices - Belfast JUG 2022
Micro Frontends for Java Microservices - Belfast JUG 2022Micro Frontends for Java Microservices - Belfast JUG 2022
Micro Frontends for Java Microservices - Belfast JUG 2022Matt Raible
 
Micro Frontends for Java Microservices - Dublin JUG 2022
Micro Frontends for Java Microservices - Dublin JUG 2022Micro Frontends for Java Microservices - Dublin JUG 2022
Micro Frontends for Java Microservices - Dublin JUG 2022Matt Raible
 
Micro Frontends for Java Microservices - Cork JUG 2022
Micro Frontends for Java Microservices - Cork JUG 2022Micro Frontends for Java Microservices - Cork JUG 2022
Micro Frontends for Java Microservices - Cork JUG 2022Matt Raible
 
Comparing Native Java REST API Frameworks - Seattle JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022Comparing Native Java REST API Frameworks - Seattle JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022Matt Raible
 
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022Matt Raible
 
Comparing Native Java REST API Frameworks - Devoxx France 2022
Comparing Native Java REST API Frameworks - Devoxx France 2022Comparing Native Java REST API Frameworks - Devoxx France 2022
Comparing Native Java REST API Frameworks - Devoxx France 2022Matt Raible
 
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...Matt Raible
 
Native Java with Spring Boot and JHipster - Garden State JUG 2021
Native Java with Spring Boot and JHipster - Garden State JUG 2021Native Java with Spring Boot and JHipster - Garden State JUG 2021
Native Java with Spring Boot and JHipster - Garden State JUG 2021Matt Raible
 
Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021Matt Raible
 
Web App Security for Java Developers - PWX 2021
Web App Security for Java Developers - PWX 2021Web App Security for Java Developers - PWX 2021
Web App Security for Java Developers - PWX 2021Matt Raible
 
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...Matt Raible
 
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...Matt Raible
 
Web App Security for Java Developers - UberConf 2021
Web App Security for Java Developers - UberConf 2021Web App Security for Java Developers - UberConf 2021
Web App Security for Java Developers - UberConf 2021Matt Raible
 
Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Matt Raible
 
Native Java with Spring Boot and JHipster - SF JUG 2021
Native Java with Spring Boot and JHipster - SF JUG 2021Native Java with Spring Boot and JHipster - SF JUG 2021
Native Java with Spring Boot and JHipster - SF JUG 2021Matt Raible
 
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...Matt Raible
 
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021Matt Raible
 
Get Hip with JHipster - Colorado Springs Open Source User Group 2021
Get Hip with JHipster - Colorado Springs Open Source User Group 2021Get Hip with JHipster - Colorado Springs Open Source User Group 2021
Get Hip with JHipster - Colorado Springs Open Source User Group 2021Matt Raible
 
JHipster and Okta - JHipster Virtual Meetup December 2020
JHipster and Okta - JHipster Virtual Meetup December 2020JHipster and Okta - JHipster Virtual Meetup December 2020
JHipster and Okta - JHipster Virtual Meetup December 2020Matt Raible
 

Mehr von Matt Raible (20)

Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
 
Micro Frontends for Java Microservices - Belfast JUG 2022
Micro Frontends for Java Microservices - Belfast JUG 2022Micro Frontends for Java Microservices - Belfast JUG 2022
Micro Frontends for Java Microservices - Belfast JUG 2022
 
Micro Frontends for Java Microservices - Dublin JUG 2022
Micro Frontends for Java Microservices - Dublin JUG 2022Micro Frontends for Java Microservices - Dublin JUG 2022
Micro Frontends for Java Microservices - Dublin JUG 2022
 
Micro Frontends for Java Microservices - Cork JUG 2022
Micro Frontends for Java Microservices - Cork JUG 2022Micro Frontends for Java Microservices - Cork JUG 2022
Micro Frontends for Java Microservices - Cork JUG 2022
 
Comparing Native Java REST API Frameworks - Seattle JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022Comparing Native Java REST API Frameworks - Seattle JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022
 
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
 
Comparing Native Java REST API Frameworks - Devoxx France 2022
Comparing Native Java REST API Frameworks - Devoxx France 2022Comparing Native Java REST API Frameworks - Devoxx France 2022
Comparing Native Java REST API Frameworks - Devoxx France 2022
 
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
 
Native Java with Spring Boot and JHipster - Garden State JUG 2021
Native Java with Spring Boot and JHipster - Garden State JUG 2021Native Java with Spring Boot and JHipster - Garden State JUG 2021
Native Java with Spring Boot and JHipster - Garden State JUG 2021
 
Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021
 
Web App Security for Java Developers - PWX 2021
Web App Security for Java Developers - PWX 2021Web App Security for Java Developers - PWX 2021
Web App Security for Java Developers - PWX 2021
 
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
 
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
 
Web App Security for Java Developers - UberConf 2021
Web App Security for Java Developers - UberConf 2021Web App Security for Java Developers - UberConf 2021
Web App Security for Java Developers - UberConf 2021
 
Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021
 
Native Java with Spring Boot and JHipster - SF JUG 2021
Native Java with Spring Boot and JHipster - SF JUG 2021Native Java with Spring Boot and JHipster - SF JUG 2021
Native Java with Spring Boot and JHipster - SF JUG 2021
 
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
 
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
 
Get Hip with JHipster - Colorado Springs Open Source User Group 2021
Get Hip with JHipster - Colorado Springs Open Source User Group 2021Get Hip with JHipster - Colorado Springs Open Source User Group 2021
Get Hip with JHipster - Colorado Springs Open Source User Group 2021
 
JHipster and Okta - JHipster Virtual Meetup December 2020
JHipster and Okta - JHipster Virtual Meetup December 2020JHipster and Okta - JHipster Virtual Meetup December 2020
JHipster and Okta - JHipster Virtual Meetup December 2020
 

Kürzlich hochgeladen

Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 

Kürzlich hochgeladen (20)

Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 

What's Coming in Spring 3.0

  • 1. What’s coming in Spring 3.0 Matt Raible Colorado Software Summit 2008 http://www.linkedin.com/in/mraible
  • 2. Agenda • Introductions • Spring History • Spring Overview • Choose Your Own Adventure • Q and A
  • 3. Introductions • Your experience with Spring? • Your experience with Java and J2EE? • What do you hope to learn today? • Open Source experience: Ant, Maven, Eclipse, Hibernate, Tomcat, JBoss? • Favorite IDE? Favorite OS?
  • 4. Who is Matt Raible? • Java Blogger since 2002 • Power user of Java Frameworks • Author of Spring Live and Pro JSP 2.0 • Founder of AppFuse (http://appfuse.org) • Lead UI Architect at LinkedIn • Father, Skier, Cyclist and Beer Connoisseur • http://www.linkedin.com/in/mraible
  • 5. The Spring Framework • Simplify J2EE • Manage Dependencies • Inversion of Control • À la carte framework
  • 9. Past Releases • March 24, 2004 - Spring 1.0 • October 5, 2006 - Spring 2.0 • November 19, 2007 - Spring 2.5 • January 2009 - Spring 3.0
  • 10. 3.0 Release Schedule • 3.0 M1 scheduled for September 2008 • 3.0 RC1 scheduled for December 2008 • 3.0 Final in January 2009
  • 11. New in Spring 2.5 • Extended Platform Support • Java SE 6, Java EE 5 and OSGi • Enhanced AspectJ support • Comprehensive support for Annotations • Bean lifecycle • Autowiring • Spring MVC enhancements
  • 12. Annotation Examples @Repository(value = quot;userDaoquot;) public class UserDaoHibernate implements UserDao { HibernateTemplate hibernateTemplate; @Autowired public UserDaoHibernate(SessionFactory sessionFactory) { this.hibernateTemplate = new HibernateTemplate(sessionFactory); } public List getUsers() { return hibernateTemplate.find(quot;from Userquot;); } @Transactional public void saveUser(User user) { hibernateTemplate.saveOrUpdate(user); } } @Service(value = quot;userManagerquot;) public class UserManagerImpl implements UserManager { @Autowired UserDao dao; public List getUsers() { return dao.getUsers(); } }
  • 13. Annotation Examples @Repository(value = quot;userDaoquot;) public class UserDaoHibernate implements UserDao { HibernateTemplate hibernateTemplate; @Autowired public UserDaoHibernate(SessionFactory sessionFactory) { this.hibernateTemplate = new HibernateTemplate(sessionFactory); } public List getUsers() { return hibernateTemplate.find(quot;from Userquot;); } @Transactional public void saveUser(User user) { hibernateTemplate.saveOrUpdate(user); } } @Service(value = quot;userManagerquot;) public class UserManagerImpl implements UserManager { @Autowired UserDao dao; public List getUsers() { return dao.getUsers(); } }
  • 14. XML Configuration Annotation Scanning <!-- Replaces ${...} placeholders with values from a properties file --> <!-- (in this case, JDBC-related settings for the dataSource definition below) --> <context:property-placeholder location=quot;classpath:jdbc.propertiesquot;/> <!-- Enable @Transactional support --> <tx:annotation-driven/> <!-- Enable @AspectJ support --> <aop:aspectj-autoproxy/> <!-- Scans for @Repository, @Service and @Component --> <context:component-scan base-package=quot;org.appfusequot;/>
  • 15. XML Configuration Declarative Transactions <aop:config> <aop:advisor id=quot;managerTxquot; advice-ref=quot;txAdvicequot; pointcut=quot;execution(* *..service.*Manager.*(..))quot;/> </aop:config> <tx:advice id=quot;txAdvicequot;> <tx:attributes> <tx:method name=quot;get*quot; read-only=quot;truequot;/> <tx:method name=quot;*quot;/> </tx:attributes> </tx:advice>
  • 16. Testing package org.appfuse.service; import org.appfuse.model.User; import static org.junit.Assert.*; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.transaction.annotation.Transactional; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration public class UserManagerTest { @Autowired UserManager userManager; @Test @Transactional public void testGetUsers() { } }
  • 17. Spring MVC Improvements @Controller public class UserController { @Autowired UserManager userManager; @RequestMapping(quot;/usersquot;) public String execute(ModelMap model) { model.addAttribute(userManager.getUsers()); return quot;userListquot;; } } <!-- Activates mapping of @Controller --> <context:component-scan base-package=quot;org.appfuse.webquot;/> <!-- Activates @Autowired for Controllers --> <context:annotation-config/> <!-- View Resolver for JSPs --> <bean id=quot;viewResolverquot; class=quot;org.springframework.web.servlet.view.InternalResourceViewResolverquot;> <property name=quot;viewClassquot; value=quot;org.springframework.web.servlet.view.JstlViewquot;/> <property name=quot;prefixquot; value=quot;/quot;/> <property name=quot;suffixquot; value=quot;.jspquot;/> </bean>
  • 18. ModelMap Naming • Automatically generates a key name • o.a.m.User ➟ ‘user’ • java.util.HashMap ➟ ‘hashMap’ • o.a.m.User[] ➟ ‘userList’ • ArrayList, HashSet ➟ ‘userList’
  • 19. @RequestMapping • Methods with @RequestMapping are allowed very flexible signatures • Arguments supported: • ServletRequest and ServletResponse • HttpSession • Locale • ModelMap • http://is.gd/2wly
  • 22. Other Spring Technologies • Spring Security 2.x with OpenID Support • Spring Web Flow 2.x • Spring Remoting (HttpInvoker) • Spring Web Services • Spring Batch • Spring Dynamic Modules • SpringSource Application Platform
  • 23. New in Spring 3.0 • Java 5+ • Spring Expression Language • New Spring MVC Features • REST • Ajax • Declarative Validation • Backwards compatible with Spring 2.5
  • 24. Spring Expression Language • Unified EL++ • Deferred evaluation of expressions • Support for expressions that can set values and invoke methods • Pluggable API for resolving Expressions • Unified EL Reference: http://is.gd/2xqF • Spring 3.0 allows usage in XML files and @Value annotations
  • 25. REST Support http://infoq.com/articles/rest-introduction
  • 26. REST with @PathParam http://myserver/myapp/show/123 @RequestMapping(method = RequestMethod.GET) public User show(@PathParam Long id) { return userManager.getUser(id); }
  • 27. REST with RestController @Controller public class ResumesController implements RestController<Resume, Long> { GET http://myserver/myapp/resumes public List<Resume> index() {} POST http://myserver/myapp/resumes public void create(Resume resume) {} GET http://myserver/myapp/resumes/1 public Resume show(Long id) {} DELETE http://myserver/myapp/resumes/1 public void delete(Long id) {} PUT http://myserver/myapp/resumes/1 public void update(Resume resume) {} }
  • 28. JAX-RS Annotations • JAX-RS: Java API for RESTful Web Services • http://jcp.org/en/jsr/detail?id=311 • http://www.infoq.com/news/2008/10/jaxrs- comparison • @Path, @GET, @PUT, @POST, @DELETE • @DefaultValue, @PathParam, @QueryParam
  • 29. Dropping Support For... • Commons Attributes • TopLink (EclipseLink instead) • MVC Controller hierarchy • JUnit 3.8 Test classes import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests; public class UserManagerTest extends AbstractTransactionalDataSourceSpringContextTests { private UserManager userManager; public void setUserManager(UserManager userManager) { this.userManager = userManager; } protected String[] getConfigLocations() { setAutowireMode(AUTOWIRE_BY_NAME); return new String[] {quot;classpath*:/WEB-INF/applicationContext*.xmlquot;}; } protected void onSetUpInTransaction() throws Exception { deleteFromTables(new String[] {quot;app_userquot;}); }
  • 30. 2.5 Community Feedback • Most common requests for Spring MVC: • Add REST Support • Add EL Support • Add Conversation Support • 3.0 Targeted Issues: • http://snurl.com/3ob7o
  • 31. Choose Your Own Adventure • Create a new Spring 3.0 Application with JPA and Spring MVC • Upgrade an existing Spring 2.0 Application to Spring 3.0
  • 32. Get the Source http://raibledesigns.com/rd/entry/the_colorado_software_summit_and
  • 33. Spring 3.0 Kickstart http://spring-kickstart.googlecode.com