SlideShare uma empresa Scribd logo
1 de 35
A Walking Tour of Spring 3.1

Josh Long, Spring Developer Advocate, SpringSource
Jürgen Höller, Principal Engineer, SpringSource
Mark Fisher, Senior Staff Engineer, SpringSource
Mark Pollack, Senior Staff Engineer, SpringSource
Dave Syer, Senior Staff Engineer, SpringSource




                                                     © 2012 SpringSource, A division of VMware. All rights reserved
About Josh Long

Spring Developer Advocate
twitter: @starbuxman
josh.long@springsource.com




                             NOT CONFIDENTIAL -- TELL EVERYONE   2
Deployment Platforms: Becoming More Diverse




        Application   Application      Application




       Frameworks     Frameworks      Frameworks
        + Libraries    + Libraries     + Libraries




       WebSphere      Tomcat         Cloud Platform




                                                      3
Wide Variety of Data and Datastores
 Not all data resides in relational databases
    
        cloud environments often suggest alternatives for scalability reasons
    
        HBase, Redis, Mongo, etc


 Distributed caches add challenges as well
    
        not least of it all in terms of application-level access patterns
    
        GemFire, Coherence, etc


 Hardly any standardization available
    
        JSR-107 – for caching – did not make progress for a long, long time
    
        finally getting picked up in Java EE 7, but again only for caching
    
        alternative datastore space is too diverse for standardization




                                                                                4
Wide Variety of Web Clients
 More and more client-side web technologies
    
        HTML 5 as a next-generation browser standard
    
        Adobe Flex as a rich client technology on the basis of Flash


 Server-side state to be minimized or even removed completely
    
        in particular: no server-side user interface state
    
        strictly controlled user session state


 JSF's state-centric approach not a great fit anymore
    
        except for special kinds of applications (which it remains very useful for)
    
        web application backends and web services based on JAX-RS / MVC style
    
        nevertheless: JSF keeps evolving – JSF 2.2 coming up in 2012




                                                                                      5
Key Elements of Spring: Ready for 2012 & Beyond




                 on
              cti
                e
            Inj




                              AO
         cy




                                P
         en
       nd
     pe
    De




                Simple
                 Simple
               Objects
      Portable Service Abstractions
                 Object
                                      More important than ever!


                                                                  6
What's New?
 Spring Framework 3.1
 Spring Integration 2.1
 Spring Data 1.0
 Spring Security 3.1




                           7
Spring Framework 3.1: Selected Features
 Environment abstraction and profiles
 Java-based application configuration
 Overhaul of the test context framework

 Cache abstraction & declarative caching
 Servlet 3.0 based web applications
 @MVC processing & flash attributes

 Refined JPA support
 Hibernate 4.0 & Quartz 2.0
 Support for Java SE 7



                                            8
Environment Abstraction
 Grouping bean definitions for activation in specific environments
 • e.g. development, testing, production
 • possibly different deployment environments
 Custom resolution of placeholders
 • dependent on the actual environment
 • hierarchy of property sources


 Injectable environment abstraction API
 • org.springframework.core.env.Environment
 Unified property resolution SPI
 • org.springframework.core.env.PropertyResolver




                                                                      9
Bean Definition Profiles
<beans profile="production">
  <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
           destroy-method="close">
   <property name="driverClass" value="${database.driver}"/>
   <property name="jdbcUrl" value="${database.url}"/>
   <property name="username" value="${database.username}"/>
   <property name="password" value="${database.password}"/>
  </bean>
</beans>


<beans profile="embedded">
  <jdbc:embedded-database id="dataSource" type="H2">
    <jdbc:script location="/WEB-INF/database/schema-member.sql"/>
    <jdbc:script location="/WEB-INF/database/schema-activity.sql"/>
    <jdbc:script location="/WEB-INF/database/schema-event.sql"/>
    <jdbc:script location="/WEB-INF/database/data.sql"/>
  </jdbc:embedded-database>
</beans>




                                                                          10
Environment Configuration
 Associating specific bean definitions with specific environments
 • XML 'profile' attribute on <beans> element
 • @Profile annotation on configuration classes
 • @Profile annotation on individual component classes


 Activating specific profiles by name
 • e.g. through a system property
   • -Dspring.profiles.active=development
 • or other means outside of the deployment unit
   • according to environment conventions


 Ideally: no need to touch deployment unit across different
 stages/environments



                                                                     11
Java-Based Application Configuration
 Application-specific container configuration
 • aligned with Spring 3.0's @Configuration style
 • focus on customizing the annotation-based processing parts of Spring


 Equivalent to XML namespace functionality
 • but not a one-to-one mapping
 • 'natural' container configuration from an annotation-oriented perspective


 Typical infrastructure setup
 • transactions
 • scheduling
 • MVC customization




                                                                               12
Application Configuration Example
@Configuration
@EnableTransactionManagement(proxyTargetClass=true)       <tx:annotation-driven transaction-manager="txManager"
                                                                     proxy-target-class="true"/>
public class DataConfig {


        @Bean
        public PlatformTransactionManager txManager() {
                 return new HibernateTransactionManager(sessionFactory());
        }


        @Bean
        public SessionFactory sessionFactory() throws Exception {
                 return new LocalSessionFactoryBuilder(dataSource())
                        .addAnnotatedClasses(Order.class, Account.class)
                        .buildSessionFactory();
        }


        @Bean
        public DataSource dataSource() {
                 // ... configure and return JDBC DataSource ...
        }
}




                                                                                                                  13
Test Context Framework
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(
    loader=AnnotationConfigContextLoader.class,
    classes={TransferServiceConfig.class, DataConfig.class})
@ActiveProfiles("dev")
public class TransferServiceTest {


    @Autowired
    private TransferService transferService;


    @Test
    public void testTransferService() {
            ...
    }
}




                                                               14
Interlude: "c:" Namespace
 New XML namespace for use with bean configuration
 • shortcut for <constructor-arg>
   • inline argument values
   • analogous to existing "p:" namespace
 • use of constructor argument names
   • recommended for readability
   • debug symbols have to be available in the application's class files


 <bean class="…" c:age="10" c:name="myName"/>


 <bean class="…" c:name-ref="nameBean"
      c:spouse-ref="spouseBean"/>




                                                                           15
Cache Abstraction
 CacheManager and Cache abstraction
 • in org.springframework.cache
   • which up until 3.0 just contained EhCache support
 • particularly important with the rise of distributed caching
   • not least of it all: in cloud environments


 Backend adapters for EhCache, GemFire, Coherence, etc
 • EhCache adapter shipping with Spring core
 • JSR-107 a.k.a. JCache support coming in Spring 3.2


 Specific cache setup per environment – through profiles?
 • potentially even adapting to a runtime-provided service




                                                                 16
Declarative Caching
@Cacheable
public Owner loadOwner(int id);


@Cacheable(condition="name.length < 10")
public Owner loadOwner(String name);


@CacheEvict
public void deleteOwner(int id);




                                           17
Servlet 3.0 Based Web Applications
 Explicit support for Servlet 3.0 containers
 • such as Tomcat 7 and GlassFish 3
 • while at the same time preserving compatibility with Servlet 2.4+


 Support for XML-free web application setup (no web.xml)
 • Servlet 3.0's ServletContainerInitializer mechanism
 • in combination with Spring 3.1's AnnotationConfigWebApplicationContext
 • plus Spring 3.1's environment abstraction


 Exposure of native Servlet 3.0 functionality in Spring MVC
 • standard Servlet 3.0 file upload behind Spring's MultipartResolver abstraction
 • support for asynchronous request processing coming in Spring 3.2




                                                                                    18
WebApplicationInitializer Example
/**
 * Automatically detected and invoked on startup by Spring's
   ServletContainerInitializer. May register listeners, filters,
   servlets etc against the given Servlet 3.0 ServletContext.
 */
public class MyWebAppInitializer implements WebApplicationInitializer {


      public void onStartup(ServletContext sc) throws ServletException {
          // Create the 'root' Spring application context
          AnnotationConfigWebApplicationContext root =
                  new AnnotationConfigWebApplicationContext();
          root.scan("com.mycompany.myapp");
          root.register(FurtherConfig.class);


          // Manages the lifecycle of the root application context
          sc.addListener(new ContextLoaderListener(root));
          ...
      }
}



                                                                           19
@MVC Processing & Flash Attributes
 RequestMethodHandlerAdapter
   
       arbitrary mappings to handler methods across multiple controllers
   
       better customization of handler method arguments
          HandlerMethodArgumentResolver
          HandlerMethodReturnValueHandler
          etc


 FlashMap support and FlashMapManager abstraction
   
       with RedirectAttributes as a new @MVC handler method argument type
          explicitly calling addFlashAttribute to add values to the output FlashMap
   
       an outgoing FlashMap will temporarily get added to the user's session
   
       an incoming FlashMap for a request will automatically get exposed to the
       model




                                                                                      20
Refined JPA Support
 Package scanning without persistence.xml
    
        'packagesToScan' feature on LocalContainerEntityManagerFactoryBean
            building a persistence unit from @Entity classes within specific application
            packages
    
        similar to AnnotationSessionFactoryBean for Hibernate 3
            rolled into core LocalSessionFactoryBean for Hibernate 4
    
        ideal for applications with a single default persistence unit


 Consistent JPA setup by persistence unit name
    
        JPA specification quite strongly based on the notion of persistence unit
        names
            @PersistenceContext / @PersistenceUnit referring to persistence unit names
    
        now Spring's JpaTransactionManager and co support setup by unit name
        as well
            as an alternative to referring to EntityManagerFactory beans directly


                                                                                           21
Third-Party Support Updates
 Hibernate 4.0
    
        natively and through JPA
    
        native support in a dedicated org.springframework.orm.hibernate4 package
           dealing with package rearrangements in the Hibernate API
    
        preserving compatibility with Hibernate 3.2+ in orm.hibernate3


 Quartz 2.0
    
        JobDetail and Trigger are now interfaces in the Quartz 2.0 API
           whereas they traditionally were base classes in Quartz 1.x
    
        SchedulerFactoryBean now auto-adapts to Quartz 2.0 if present
           JobDetail/CronTrigger/SimpleTriggerFactoryBean variants for Quartz 2.0
    
        preserving compatibility with Quartz 1.5+ in the same support package




                                                                                    22
Java SE 7
 Spring 3.1 introduces Java SE 7 support
    
        making best use of JRE 7 at runtime
    
        support for JDBC 4.1
    
        support for fork-join framework


 Oracle's OpenJDK 7 released in summer 2011
    
        IBM JDK 7 following not much later
    
        Java 7 could be the norm for new Java based projects soon


 Spring Framework not being built against Java 7 yet
    
        build upgrade coming in Spring 3.2




                                                                    23
Summary
 Spring serves as an enabler for modern Java architectures
    
        annotated components with dependency injection and declarative services
    
        flexible deployment options for any Java based target platform


 Java SE 7 and Servlet 3.0 as common ground for years to come
    
        embedded application frameworks such as Spring are a perfect fit on top
    
        Spring as a programming and configuration model for cloud-based
        deployments


 Spring Framework 3.1 introduces several new key features
    
        environment abstraction and bean definition profiles
    
        cache abstraction and declarative caching
    
        web application deployment without web.xml
    
        compatibility with the latest platform standards and libraries

                                                                                  24
Spring Integration 2.1
 JSR-223 Scripting Support (Javascript, JRuby, Jython, Groovy)
 AMQP/RabbitMQ
 Spring Data:
    
        GemFire
    
        Redis
    
        MongoDB
 Stored Procedures
 Resource Inbound Channel Adapter
 XPath Filter
 Payload Enricher
 FTP and SFTP Outbound Gateways
 STS Templates


                                                                  25
Stored Procedures
 inbound/outbound Channel Adapters
 outbound Gateway
 supports stored procs on: derby, db2, mysql, ms sql, oracle, postgres,
 sybase
 supports sql functions on: mysql, ms sql, oracle, postgres




                                                                           26
Payload Enricher
Forward message to a nested flow and evaluate an expression against the
 result to enrich the payload

    <int:enricher id="findUserByUsernameEnricher"
              input-channel="findUserByUsernameEnricherChannel"
              request-channel="findUserByUsernameServiceChannel"
              request-payload-expression="payload.username">
       <int:property name="email" expression="payload.email"/>
       <int:property name="password" expression="payload.password"/>
    </int:enricher>




                                                                       27
FTP and SFTP
Adding request/reply functionality in addition to the existing one-way
 Channel Adapters




     <int-ftp:outbound-gateway id="gatewayGET" cache-sessions="false"
               local-directory="/tmp/gatewayGET"
               session-factory="ftpSessionFactory"
               request-channel="toGet"
               reply-channel="toRemoveChannel"
               command="get"
               command-options="-P"
               expression="payload.remoteDirectory + '/' + payload.filename"/>




                                                                                 28
Spring Data: Background and Motivation

   Data access landscape has changed considerably
   RDBMS are still important and predominant
•   but no longer considered a “one size fits all” solution
   Spring has always provided excellent data access support
   Spring Data project goal is to “refresh” Spring’s data support for
•   Traditional: JDBC, JPA
•   New: Grid, NoSql, Hadoop
   Provide familiar and consistent Spring-based programming model
•   While retaining technology specific features and capabilities
   Remove boiler-plate code for writing a data access layer
•   Common interfaces that can be used across different technologies
Spring Data is an “umbrella project”

   JPA -
   JDBC Extensions
   Hadoop – Big Data Storage and Analysis platform
   Gemfire – Distributed Data Grid
   Redis – Key Value Database
   MongoDB – Document Database
   Neo4j – Graph Database

   Commons – shared abstractions
•   Repositories
•   Object Mapping
   QueryDSL – integration with type-safe query API
Spring Data Repositories

p u b l i c i n t e r f a c e R e p o s i t o r y <T , I D e x t e n d s S e r i a l i z a b l e > {

}


p u b l i c i n t e r f a c e C r u d R e p o s i t o r y <T , I D e x t e n d s S e r i a l i z a b l e > e x t e n d s
                                                               R e p o s i t o r y <T , I D > {

    T s a v e ( T e n t it y ) ;

    I t e r a b l e <T > s a v e ( I t e r a b l e <? e x t e n d s T > e n t i t i e s ) ;

    T f in d O n e ( ID id ) ;

    b o o le a n e x is t s ( ID id ) ;

    I t e r a b l e <T > f i n d A l l ( ) ;

    lo n g c o u n t ( ) ;

    v o id d e le t e ( ID id ) ;

    v o id d e le t e ( T e n t it y ) ;

    v o i d d e l e t e ( I t e r a b l e <? e x t e n d s T > e n t i t i e s ) ;

    v o id d e le t e A ll( ) ;
}
Spring Data Repositories

p u b l i c i n t e r f a c e R e p o s i t o r y <T , I D e x t e n d s S e r i a l i z a b l e > {

}


p u b l i c i n t e r f a c e C r u d R e p o s i t o r y <T , I D e x t e n d s S e r i a l i z a b l e > e x t e n d s
                                                               R e p o s i t o r y <T , I D > {

    T s a v e ( T e n t it y ) ;

    I t e r a b l e <T > s a v e ( I t e r a b l e <? e x t e n d s T > e n t i t i e s ) ;

    T f in d O n e ( ID id ) ;

    b o o le a n e x is t s ( ID id ) ;

    I t e r a b l e <T > f i n d A l l ( ) ;

    lo n g c o u n t ( ) ;

    v o id d e le t e ( ID id ) ;

    v o id d e le t e ( T e n t it y ) ;

    v o i d d e l e t e ( I t e r a b l e <? e x t e n d s T > e n t i t i e s ) ;

    v o id d e le t e A ll( ) ;
}
Spring Security 3.1
   Multiple http elements
   Stateless authentication
   Improved Active Directory LDAP support
   Crypto Module.
   Disabling UI security (for testing purposes)
   Erasing credentials after successful authentication
   Clearing cookies on logout
   Support arbitrary implementations of JAAS Configuration




                                                              33
Spring Security: Project Organization
        Luke Taylor (VMW),
        Rob Winch                                               Core
                             Spring Security
                                                                             Web
                                      
                                        3.1.0 released
                                      
                                        Stable, mature
Ryan Heaton,                                                                                  ...
Dave Syer (VMW),                                                       LDAP     OpenID


     Spring Security OAuth
                                                           Spring Extensions: Security
                                                                 Vladimir Schaefer,
                              Keith Donald,                      Mike Wiesner (VMW)
                    OAuth2    Craig Walls (VMW)
     OAuth1a
                                                                      SAML     Kerberos
                                          Spring Social
 
   Oauth2 spec not yet final
 
   External lead
                                                                  
                                                                    1.0.0 not yet released
                                  
                                    1.0.0 released                
                                                                    Partly external, low-activity
 
   1.0.0.M6 release in pipeline   
                                    Consumer for well-
                                    known providers


                                            CONFIDENTIAL                                     34
github.com/joshlong/a-walking-tour-of-spring-31/




                Questions?
               Say hi on Twitter:
          @starbuxman @springsource
                NOT CONFIDENTIAL -- TELL EVERYONE

Mais conteúdo relacionado

Mais procurados

Java EE 8 Recipes
Java EE 8 RecipesJava EE 8 Recipes
Java EE 8 RecipesJosh Juneau
 
GlassFish & Java EE Business Update @ CEJUG
GlassFish & Java EE Business Update @ CEJUGGlassFish & Java EE Business Update @ CEJUG
GlassFish & Java EE Business Update @ CEJUGArun Gupta
 
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012Arun Gupta
 
Running your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the CloudRunning your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the CloudArun Gupta
 
Lecture 7 Web Services JAX-WS & JAX-RS
Lecture 7   Web Services JAX-WS & JAX-RSLecture 7   Web Services JAX-WS & JAX-RS
Lecture 7 Web Services JAX-WS & JAX-RSFahad Golra
 
JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesArun Gupta
 
Spring Framework - MVC
Spring Framework - MVCSpring Framework - MVC
Spring Framework - MVCDzmitry Naskou
 
Java Summit Chennai: JAX-RS 2.0
Java Summit Chennai: JAX-RS 2.0Java Summit Chennai: JAX-RS 2.0
Java Summit Chennai: JAX-RS 2.0Arun Gupta
 
MVC on the server and on the client
MVC on the server and on the clientMVC on the server and on the client
MVC on the server and on the clientSebastiano Armeli
 
Java Web Programming [2/9] : Servlet Basic
Java Web Programming [2/9] : Servlet BasicJava Web Programming [2/9] : Servlet Basic
Java Web Programming [2/9] : Servlet BasicIMC Institute
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - CoreDzmitry Naskou
 
The Java EE 7 Platform: Productivity++ & Embracing HTML5
The Java EE 7 Platform: Productivity++ & Embracing HTML5The Java EE 7 Platform: Productivity++ & Embracing HTML5
The Java EE 7 Platform: Productivity++ & Embracing HTML5Arun Gupta
 
Java Web Programming [3/9] : Servlet Advanced
Java Web Programming [3/9] : Servlet AdvancedJava Web Programming [3/9] : Servlet Advanced
Java Web Programming [3/9] : Servlet AdvancedIMC Institute
 
Introducing WebLogic 12c OTN Tour 2012
Introducing WebLogic 12c OTN Tour 2012Introducing WebLogic 12c OTN Tour 2012
Introducing WebLogic 12c OTN Tour 2012Bruno Borges
 
Spring Cairngorm
Spring CairngormSpring Cairngorm
Spring Cairngormdevaraj ns
 
Java Web Programming [6/9] : MVC
Java Web Programming [6/9] : MVCJava Web Programming [6/9] : MVC
Java Web Programming [6/9] : MVCIMC Institute
 
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012Arun Gupta
 
5050 dev nation
5050 dev nation5050 dev nation
5050 dev nationArun Gupta
 

Mais procurados (19)

Java EE 8 Recipes
Java EE 8 RecipesJava EE 8 Recipes
Java EE 8 Recipes
 
GlassFish & Java EE Business Update @ CEJUG
GlassFish & Java EE Business Update @ CEJUGGlassFish & Java EE Business Update @ CEJUG
GlassFish & Java EE Business Update @ CEJUG
 
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
The Java EE 7 Platform: Productivity & HTML5 at JavaOne Latin America 2012
 
Running your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the CloudRunning your Java EE 6 applications in the Cloud
Running your Java EE 6 applications in the Cloud
 
Lecture 7 Web Services JAX-WS & JAX-RS
Lecture 7   Web Services JAX-WS & JAX-RSLecture 7   Web Services JAX-WS & JAX-RS
Lecture 7 Web Services JAX-WS & JAX-RS
 
JAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web ServicesJAX-RS 2.0: RESTful Web Services
JAX-RS 2.0: RESTful Web Services
 
Spring Framework - MVC
Spring Framework - MVCSpring Framework - MVC
Spring Framework - MVC
 
Java Summit Chennai: JAX-RS 2.0
Java Summit Chennai: JAX-RS 2.0Java Summit Chennai: JAX-RS 2.0
Java Summit Chennai: JAX-RS 2.0
 
MVC on the server and on the client
MVC on the server and on the clientMVC on the server and on the client
MVC on the server and on the client
 
Java Web Programming [2/9] : Servlet Basic
Java Web Programming [2/9] : Servlet BasicJava Web Programming [2/9] : Servlet Basic
Java Web Programming [2/9] : Servlet Basic
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
 
The Java EE 7 Platform: Productivity++ & Embracing HTML5
The Java EE 7 Platform: Productivity++ & Embracing HTML5The Java EE 7 Platform: Productivity++ & Embracing HTML5
The Java EE 7 Platform: Productivity++ & Embracing HTML5
 
Java Web Programming [3/9] : Servlet Advanced
Java Web Programming [3/9] : Servlet AdvancedJava Web Programming [3/9] : Servlet Advanced
Java Web Programming [3/9] : Servlet Advanced
 
Introducing WebLogic 12c OTN Tour 2012
Introducing WebLogic 12c OTN Tour 2012Introducing WebLogic 12c OTN Tour 2012
Introducing WebLogic 12c OTN Tour 2012
 
Spring Cairngorm
Spring CairngormSpring Cairngorm
Spring Cairngorm
 
jsf2 Notes
jsf2 Notesjsf2 Notes
jsf2 Notes
 
Java Web Programming [6/9] : MVC
Java Web Programming [6/9] : MVCJava Web Programming [6/9] : MVC
Java Web Programming [6/9] : MVC
 
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
Building HTML5 WebSocket Apps in Java at JavaOne Latin America 2012
 
5050 dev nation
5050 dev nation5050 dev nation
5050 dev nation
 

Semelhante a Spring 3.1: a Walking Tour

Spring design-juergen-qcon
Spring design-juergen-qconSpring design-juergen-qcon
Spring design-juergen-qconYiwei Ma
 
Spring 3.1 in a Nutshell - JAX London 2011
Spring 3.1 in a Nutshell - JAX London 2011Spring 3.1 in a Nutshell - JAX London 2011
Spring 3.1 in a Nutshell - JAX London 2011Sam Brannen
 
Spring Day | Spring 3.1 in a Nutshell | Sam Brannen
Spring Day | Spring 3.1 in a Nutshell | Sam BrannenSpring Day | Spring 3.1 in a Nutshell | Sam Brannen
Spring Day | Spring 3.1 in a Nutshell | Sam BrannenJAX London
 
A first Draft to Java Configuration
A first Draft to Java ConfigurationA first Draft to Java Configuration
A first Draft to Java ConfigurationAnatole Tresch
 
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012Sam Brannen
 
GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration BackendArun Gupta
 
스프링 프레임워크
스프링 프레임워크스프링 프레임워크
스프링 프레임워크Yoonki Chang
 
Enterprise Java in 2012 and Beyond, by Juergen Hoeller
Enterprise Java in 2012 and Beyond, by Juergen Hoeller Enterprise Java in 2012 and Beyond, by Juergen Hoeller
Enterprise Java in 2012 and Beyond, by Juergen Hoeller Codemotion
 
Integration of Backbone.js with Spring 3.1
Integration of Backbone.js with Spring 3.1Integration of Backbone.js with Spring 3.1
Integration of Backbone.js with Spring 3.1Michał Orman
 
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of ControlJava Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of ControlArjun Thakur
 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012Arun Gupta
 
Rollin onj Rubyv3
Rollin onj Rubyv3Rollin onj Rubyv3
Rollin onj Rubyv3Oracle
 
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGJava EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGArun Gupta
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerArun Gupta
 
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionJava EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionArun Gupta
 
Lecture 19 dynamic web - java - part 1
Lecture 19   dynamic web - java - part 1Lecture 19   dynamic web - java - part 1
Lecture 19 dynamic web - java - part 1Д. Ганаа
 
Java J2EE Interview Questions Part 2
Java J2EE Interview Questions Part 2Java J2EE Interview Questions Part 2
Java J2EE Interview Questions Part 2javatrainingonline
 
Spring 3 - Der dritte Frühling
Spring 3 - Der dritte FrühlingSpring 3 - Der dritte Frühling
Spring 3 - Der dritte FrühlingThorsten Kamann
 

Semelhante a Spring 3.1: a Walking Tour (20)

Spring design-juergen-qcon
Spring design-juergen-qconSpring design-juergen-qcon
Spring design-juergen-qcon
 
Spring 3.1 in a Nutshell - JAX London 2011
Spring 3.1 in a Nutshell - JAX London 2011Spring 3.1 in a Nutshell - JAX London 2011
Spring 3.1 in a Nutshell - JAX London 2011
 
Spring Day | Spring 3.1 in a Nutshell | Sam Brannen
Spring Day | Spring 3.1 in a Nutshell | Sam BrannenSpring Day | Spring 3.1 in a Nutshell | Sam Brannen
Spring Day | Spring 3.1 in a Nutshell | Sam Brannen
 
A first Draft to Java Configuration
A first Draft to Java ConfigurationA first Draft to Java Configuration
A first Draft to Java Configuration
 
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
Spring 3.1 to 3.2 in a Nutshell - Spring I/O 2012
 
GlassFish REST Administration Backend
GlassFish REST Administration BackendGlassFish REST Administration Backend
GlassFish REST Administration Backend
 
스프링 프레임워크
스프링 프레임워크스프링 프레임워크
스프링 프레임워크
 
Lo nuevo en Spring 3.0
Lo nuevo  en Spring 3.0Lo nuevo  en Spring 3.0
Lo nuevo en Spring 3.0
 
Enterprise Java in 2012 and Beyond, by Juergen Hoeller
Enterprise Java in 2012 and Beyond, by Juergen Hoeller Enterprise Java in 2012 and Beyond, by Juergen Hoeller
Enterprise Java in 2012 and Beyond, by Juergen Hoeller
 
Integration of Backbone.js with Spring 3.1
Integration of Backbone.js with Spring 3.1Integration of Backbone.js with Spring 3.1
Integration of Backbone.js with Spring 3.1
 
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of ControlJava Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
 
GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012GlassFish REST Administration Backend at JavaOne India 2012
GlassFish REST Administration Backend at JavaOne India 2012
 
Rollin onj Rubyv3
Rollin onj Rubyv3Rollin onj Rubyv3
Rollin onj Rubyv3
 
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUGJava EE 6 & GlassFish = Less Code + More Power at CEJUG
Java EE 6 & GlassFish = Less Code + More Power at CEJUG
 
Java EE 6 = Less Code + More Power
Java EE 6 = Less Code + More PowerJava EE 6 = Less Code + More Power
Java EE 6 = Less Code + More Power
 
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnitionJava EE 6 & GlassFish = Less Code + More Power @ DevIgnition
Java EE 6 & GlassFish = Less Code + More Power @ DevIgnition
 
Lecture 19 dynamic web - java - part 1
Lecture 19   dynamic web - java - part 1Lecture 19   dynamic web - java - part 1
Lecture 19 dynamic web - java - part 1
 
Java J2EE Interview Questions Part 2
Java J2EE Interview Questions Part 2Java J2EE Interview Questions Part 2
Java J2EE Interview Questions Part 2
 
Java J2EE Interview Question Part 2
Java J2EE Interview Question Part 2Java J2EE Interview Question Part 2
Java J2EE Interview Question Part 2
 
Spring 3 - Der dritte Frühling
Spring 3 - Der dritte FrühlingSpring 3 - Der dritte Frühling
Spring 3 - Der dritte Frühling
 

Mais de Joshua Long

Economies of Scaling Software
Economies of Scaling SoftwareEconomies of Scaling Software
Economies of Scaling SoftwareJoshua Long
 
Bootiful Code with Spring Boot
Bootiful Code with Spring BootBootiful Code with Spring Boot
Bootiful Code with Spring BootJoshua Long
 
Microservices with Spring Boot
Microservices with Spring BootMicroservices with Spring Boot
Microservices with Spring BootJoshua Long
 
Have You Seen Spring Lately?
Have You Seen Spring Lately?Have You Seen Spring Lately?
Have You Seen Spring Lately?Joshua Long
 
Java Configuration Deep Dive with Spring
Java Configuration Deep Dive with SpringJava Configuration Deep Dive with Spring
Java Configuration Deep Dive with SpringJoshua Long
 
the Spring Update from JavaOne 2013
the Spring Update from JavaOne 2013the Spring Update from JavaOne 2013
the Spring Update from JavaOne 2013Joshua Long
 
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy ClarksonMulti Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy ClarksonJoshua Long
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with SpringJoshua Long
 
the Spring 4 update
the Spring 4 updatethe Spring 4 update
the Spring 4 updateJoshua Long
 
Extending spring
Extending springExtending spring
Extending springJoshua Long
 
The spring 32 update final
The spring 32 update finalThe spring 32 update final
The spring 32 update finalJoshua Long
 
Integration and Batch Processing on Cloud Foundry
Integration and Batch Processing on Cloud FoundryIntegration and Batch Processing on Cloud Foundry
Integration and Batch Processing on Cloud FoundryJoshua Long
 
using Spring and MongoDB on Cloud Foundry
using Spring and MongoDB on Cloud Foundryusing Spring and MongoDB on Cloud Foundry
using Spring and MongoDB on Cloud FoundryJoshua Long
 
Spring in-the-cloud
Spring in-the-cloudSpring in-the-cloud
Spring in-the-cloudJoshua Long
 
The Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
The Cloud Foundry bootcamp talk from SpringOne On The Road - EuropeThe Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
The Cloud Foundry bootcamp talk from SpringOne On The Road - EuropeJoshua Long
 
Spring Batch Behind the Scenes
Spring Batch Behind the ScenesSpring Batch Behind the Scenes
Spring Batch Behind the ScenesJoshua Long
 
Cloud Foundry Bootcamp
Cloud Foundry BootcampCloud Foundry Bootcamp
Cloud Foundry BootcampJoshua Long
 
Spring and Cloud Foundry; a Marriage Made in Heaven
Spring and Cloud Foundry; a Marriage Made in HeavenSpring and Cloud Foundry; a Marriage Made in Heaven
Spring and Cloud Foundry; a Marriage Made in HeavenJoshua Long
 
Extending Spring for Custom Usage
Extending Spring for Custom UsageExtending Spring for Custom Usage
Extending Spring for Custom UsageJoshua Long
 

Mais de Joshua Long (20)

Economies of Scaling Software
Economies of Scaling SoftwareEconomies of Scaling Software
Economies of Scaling Software
 
Bootiful Code with Spring Boot
Bootiful Code with Spring BootBootiful Code with Spring Boot
Bootiful Code with Spring Boot
 
Microservices with Spring Boot
Microservices with Spring BootMicroservices with Spring Boot
Microservices with Spring Boot
 
Boot It Up
Boot It UpBoot It Up
Boot It Up
 
Have You Seen Spring Lately?
Have You Seen Spring Lately?Have You Seen Spring Lately?
Have You Seen Spring Lately?
 
Java Configuration Deep Dive with Spring
Java Configuration Deep Dive with SpringJava Configuration Deep Dive with Spring
Java Configuration Deep Dive with Spring
 
the Spring Update from JavaOne 2013
the Spring Update from JavaOne 2013the Spring Update from JavaOne 2013
the Spring Update from JavaOne 2013
 
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy ClarksonMulti Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy Clarkson
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with Spring
 
the Spring 4 update
the Spring 4 updatethe Spring 4 update
the Spring 4 update
 
Extending spring
Extending springExtending spring
Extending spring
 
The spring 32 update final
The spring 32 update finalThe spring 32 update final
The spring 32 update final
 
Integration and Batch Processing on Cloud Foundry
Integration and Batch Processing on Cloud FoundryIntegration and Batch Processing on Cloud Foundry
Integration and Batch Processing on Cloud Foundry
 
using Spring and MongoDB on Cloud Foundry
using Spring and MongoDB on Cloud Foundryusing Spring and MongoDB on Cloud Foundry
using Spring and MongoDB on Cloud Foundry
 
Spring in-the-cloud
Spring in-the-cloudSpring in-the-cloud
Spring in-the-cloud
 
The Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
The Cloud Foundry bootcamp talk from SpringOne On The Road - EuropeThe Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
The Cloud Foundry bootcamp talk from SpringOne On The Road - Europe
 
Spring Batch Behind the Scenes
Spring Batch Behind the ScenesSpring Batch Behind the Scenes
Spring Batch Behind the Scenes
 
Cloud Foundry Bootcamp
Cloud Foundry BootcampCloud Foundry Bootcamp
Cloud Foundry Bootcamp
 
Spring and Cloud Foundry; a Marriage Made in Heaven
Spring and Cloud Foundry; a Marriage Made in HeavenSpring and Cloud Foundry; a Marriage Made in Heaven
Spring and Cloud Foundry; a Marriage Made in Heaven
 
Extending Spring for Custom Usage
Extending Spring for Custom UsageExtending Spring for Custom Usage
Extending Spring for Custom Usage
 

Último

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
 
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
 
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
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
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
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
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
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
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
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: 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
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 

Último (20)

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.
 
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
 
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
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
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...
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
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
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
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
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: 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
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 

Spring 3.1: a Walking Tour

  • 1. A Walking Tour of Spring 3.1 Josh Long, Spring Developer Advocate, SpringSource Jürgen Höller, Principal Engineer, SpringSource Mark Fisher, Senior Staff Engineer, SpringSource Mark Pollack, Senior Staff Engineer, SpringSource Dave Syer, Senior Staff Engineer, SpringSource © 2012 SpringSource, A division of VMware. All rights reserved
  • 2. About Josh Long Spring Developer Advocate twitter: @starbuxman josh.long@springsource.com NOT CONFIDENTIAL -- TELL EVERYONE 2
  • 3. Deployment Platforms: Becoming More Diverse Application Application Application Frameworks Frameworks Frameworks + Libraries + Libraries + Libraries WebSphere Tomcat Cloud Platform 3
  • 4. Wide Variety of Data and Datastores  Not all data resides in relational databases  cloud environments often suggest alternatives for scalability reasons  HBase, Redis, Mongo, etc  Distributed caches add challenges as well  not least of it all in terms of application-level access patterns  GemFire, Coherence, etc  Hardly any standardization available  JSR-107 – for caching – did not make progress for a long, long time  finally getting picked up in Java EE 7, but again only for caching  alternative datastore space is too diverse for standardization 4
  • 5. Wide Variety of Web Clients  More and more client-side web technologies  HTML 5 as a next-generation browser standard  Adobe Flex as a rich client technology on the basis of Flash  Server-side state to be minimized or even removed completely  in particular: no server-side user interface state  strictly controlled user session state  JSF's state-centric approach not a great fit anymore  except for special kinds of applications (which it remains very useful for)  web application backends and web services based on JAX-RS / MVC style  nevertheless: JSF keeps evolving – JSF 2.2 coming up in 2012 5
  • 6. Key Elements of Spring: Ready for 2012 & Beyond on cti e Inj AO cy P en nd pe De Simple Simple Objects Portable Service Abstractions Object More important than ever! 6
  • 7. What's New?  Spring Framework 3.1  Spring Integration 2.1  Spring Data 1.0  Spring Security 3.1 7
  • 8. Spring Framework 3.1: Selected Features  Environment abstraction and profiles  Java-based application configuration  Overhaul of the test context framework  Cache abstraction & declarative caching  Servlet 3.0 based web applications  @MVC processing & flash attributes  Refined JPA support  Hibernate 4.0 & Quartz 2.0  Support for Java SE 7 8
  • 9. Environment Abstraction  Grouping bean definitions for activation in specific environments • e.g. development, testing, production • possibly different deployment environments  Custom resolution of placeholders • dependent on the actual environment • hierarchy of property sources  Injectable environment abstraction API • org.springframework.core.env.Environment  Unified property resolution SPI • org.springframework.core.env.PropertyResolver 9
  • 10. Bean Definition Profiles <beans profile="production"> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClass" value="${database.driver}"/> <property name="jdbcUrl" value="${database.url}"/> <property name="username" value="${database.username}"/> <property name="password" value="${database.password}"/> </bean> </beans> <beans profile="embedded"> <jdbc:embedded-database id="dataSource" type="H2"> <jdbc:script location="/WEB-INF/database/schema-member.sql"/> <jdbc:script location="/WEB-INF/database/schema-activity.sql"/> <jdbc:script location="/WEB-INF/database/schema-event.sql"/> <jdbc:script location="/WEB-INF/database/data.sql"/> </jdbc:embedded-database> </beans> 10
  • 11. Environment Configuration  Associating specific bean definitions with specific environments • XML 'profile' attribute on <beans> element • @Profile annotation on configuration classes • @Profile annotation on individual component classes  Activating specific profiles by name • e.g. through a system property • -Dspring.profiles.active=development • or other means outside of the deployment unit • according to environment conventions  Ideally: no need to touch deployment unit across different stages/environments 11
  • 12. Java-Based Application Configuration  Application-specific container configuration • aligned with Spring 3.0's @Configuration style • focus on customizing the annotation-based processing parts of Spring  Equivalent to XML namespace functionality • but not a one-to-one mapping • 'natural' container configuration from an annotation-oriented perspective  Typical infrastructure setup • transactions • scheduling • MVC customization 12
  • 13. Application Configuration Example @Configuration @EnableTransactionManagement(proxyTargetClass=true) <tx:annotation-driven transaction-manager="txManager" proxy-target-class="true"/> public class DataConfig { @Bean public PlatformTransactionManager txManager() { return new HibernateTransactionManager(sessionFactory()); } @Bean public SessionFactory sessionFactory() throws Exception { return new LocalSessionFactoryBuilder(dataSource()) .addAnnotatedClasses(Order.class, Account.class) .buildSessionFactory(); } @Bean public DataSource dataSource() { // ... configure and return JDBC DataSource ... } } 13
  • 14. Test Context Framework @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration( loader=AnnotationConfigContextLoader.class, classes={TransferServiceConfig.class, DataConfig.class}) @ActiveProfiles("dev") public class TransferServiceTest { @Autowired private TransferService transferService; @Test public void testTransferService() { ... } } 14
  • 15. Interlude: "c:" Namespace  New XML namespace for use with bean configuration • shortcut for <constructor-arg> • inline argument values • analogous to existing "p:" namespace • use of constructor argument names • recommended for readability • debug symbols have to be available in the application's class files <bean class="…" c:age="10" c:name="myName"/> <bean class="…" c:name-ref="nameBean" c:spouse-ref="spouseBean"/> 15
  • 16. Cache Abstraction  CacheManager and Cache abstraction • in org.springframework.cache • which up until 3.0 just contained EhCache support • particularly important with the rise of distributed caching • not least of it all: in cloud environments  Backend adapters for EhCache, GemFire, Coherence, etc • EhCache adapter shipping with Spring core • JSR-107 a.k.a. JCache support coming in Spring 3.2  Specific cache setup per environment – through profiles? • potentially even adapting to a runtime-provided service 16
  • 17. Declarative Caching @Cacheable public Owner loadOwner(int id); @Cacheable(condition="name.length < 10") public Owner loadOwner(String name); @CacheEvict public void deleteOwner(int id); 17
  • 18. Servlet 3.0 Based Web Applications  Explicit support for Servlet 3.0 containers • such as Tomcat 7 and GlassFish 3 • while at the same time preserving compatibility with Servlet 2.4+  Support for XML-free web application setup (no web.xml) • Servlet 3.0's ServletContainerInitializer mechanism • in combination with Spring 3.1's AnnotationConfigWebApplicationContext • plus Spring 3.1's environment abstraction  Exposure of native Servlet 3.0 functionality in Spring MVC • standard Servlet 3.0 file upload behind Spring's MultipartResolver abstraction • support for asynchronous request processing coming in Spring 3.2 18
  • 19. WebApplicationInitializer Example /** * Automatically detected and invoked on startup by Spring's ServletContainerInitializer. May register listeners, filters, servlets etc against the given Servlet 3.0 ServletContext. */ public class MyWebAppInitializer implements WebApplicationInitializer { public void onStartup(ServletContext sc) throws ServletException { // Create the 'root' Spring application context AnnotationConfigWebApplicationContext root = new AnnotationConfigWebApplicationContext(); root.scan("com.mycompany.myapp"); root.register(FurtherConfig.class); // Manages the lifecycle of the root application context sc.addListener(new ContextLoaderListener(root)); ... } } 19
  • 20. @MVC Processing & Flash Attributes  RequestMethodHandlerAdapter  arbitrary mappings to handler methods across multiple controllers  better customization of handler method arguments HandlerMethodArgumentResolver HandlerMethodReturnValueHandler etc  FlashMap support and FlashMapManager abstraction  with RedirectAttributes as a new @MVC handler method argument type explicitly calling addFlashAttribute to add values to the output FlashMap  an outgoing FlashMap will temporarily get added to the user's session  an incoming FlashMap for a request will automatically get exposed to the model 20
  • 21. Refined JPA Support  Package scanning without persistence.xml  'packagesToScan' feature on LocalContainerEntityManagerFactoryBean building a persistence unit from @Entity classes within specific application packages  similar to AnnotationSessionFactoryBean for Hibernate 3 rolled into core LocalSessionFactoryBean for Hibernate 4  ideal for applications with a single default persistence unit  Consistent JPA setup by persistence unit name  JPA specification quite strongly based on the notion of persistence unit names @PersistenceContext / @PersistenceUnit referring to persistence unit names  now Spring's JpaTransactionManager and co support setup by unit name as well as an alternative to referring to EntityManagerFactory beans directly 21
  • 22. Third-Party Support Updates  Hibernate 4.0  natively and through JPA  native support in a dedicated org.springframework.orm.hibernate4 package dealing with package rearrangements in the Hibernate API  preserving compatibility with Hibernate 3.2+ in orm.hibernate3  Quartz 2.0  JobDetail and Trigger are now interfaces in the Quartz 2.0 API whereas they traditionally were base classes in Quartz 1.x  SchedulerFactoryBean now auto-adapts to Quartz 2.0 if present JobDetail/CronTrigger/SimpleTriggerFactoryBean variants for Quartz 2.0  preserving compatibility with Quartz 1.5+ in the same support package 22
  • 23. Java SE 7  Spring 3.1 introduces Java SE 7 support  making best use of JRE 7 at runtime  support for JDBC 4.1  support for fork-join framework  Oracle's OpenJDK 7 released in summer 2011  IBM JDK 7 following not much later  Java 7 could be the norm for new Java based projects soon  Spring Framework not being built against Java 7 yet  build upgrade coming in Spring 3.2 23
  • 24. Summary  Spring serves as an enabler for modern Java architectures  annotated components with dependency injection and declarative services  flexible deployment options for any Java based target platform  Java SE 7 and Servlet 3.0 as common ground for years to come  embedded application frameworks such as Spring are a perfect fit on top  Spring as a programming and configuration model for cloud-based deployments  Spring Framework 3.1 introduces several new key features  environment abstraction and bean definition profiles  cache abstraction and declarative caching  web application deployment without web.xml  compatibility with the latest platform standards and libraries 24
  • 25. Spring Integration 2.1  JSR-223 Scripting Support (Javascript, JRuby, Jython, Groovy)  AMQP/RabbitMQ  Spring Data:  GemFire  Redis  MongoDB  Stored Procedures  Resource Inbound Channel Adapter  XPath Filter  Payload Enricher  FTP and SFTP Outbound Gateways  STS Templates 25
  • 26. Stored Procedures  inbound/outbound Channel Adapters  outbound Gateway  supports stored procs on: derby, db2, mysql, ms sql, oracle, postgres, sybase  supports sql functions on: mysql, ms sql, oracle, postgres 26
  • 27. Payload Enricher Forward message to a nested flow and evaluate an expression against the result to enrich the payload <int:enricher id="findUserByUsernameEnricher" input-channel="findUserByUsernameEnricherChannel" request-channel="findUserByUsernameServiceChannel" request-payload-expression="payload.username"> <int:property name="email" expression="payload.email"/> <int:property name="password" expression="payload.password"/> </int:enricher> 27
  • 28. FTP and SFTP Adding request/reply functionality in addition to the existing one-way Channel Adapters <int-ftp:outbound-gateway id="gatewayGET" cache-sessions="false" local-directory="/tmp/gatewayGET" session-factory="ftpSessionFactory" request-channel="toGet" reply-channel="toRemoveChannel" command="get" command-options="-P" expression="payload.remoteDirectory + '/' + payload.filename"/> 28
  • 29. Spring Data: Background and Motivation  Data access landscape has changed considerably  RDBMS are still important and predominant • but no longer considered a “one size fits all” solution  Spring has always provided excellent data access support  Spring Data project goal is to “refresh” Spring’s data support for • Traditional: JDBC, JPA • New: Grid, NoSql, Hadoop  Provide familiar and consistent Spring-based programming model • While retaining technology specific features and capabilities  Remove boiler-plate code for writing a data access layer • Common interfaces that can be used across different technologies
  • 30. Spring Data is an “umbrella project”  JPA -  JDBC Extensions  Hadoop – Big Data Storage and Analysis platform  Gemfire – Distributed Data Grid  Redis – Key Value Database  MongoDB – Document Database  Neo4j – Graph Database  Commons – shared abstractions • Repositories • Object Mapping  QueryDSL – integration with type-safe query API
  • 31. Spring Data Repositories p u b l i c i n t e r f a c e R e p o s i t o r y <T , I D e x t e n d s S e r i a l i z a b l e > { } p u b l i c i n t e r f a c e C r u d R e p o s i t o r y <T , I D e x t e n d s S e r i a l i z a b l e > e x t e n d s R e p o s i t o r y <T , I D > { T s a v e ( T e n t it y ) ; I t e r a b l e <T > s a v e ( I t e r a b l e <? e x t e n d s T > e n t i t i e s ) ; T f in d O n e ( ID id ) ; b o o le a n e x is t s ( ID id ) ; I t e r a b l e <T > f i n d A l l ( ) ; lo n g c o u n t ( ) ; v o id d e le t e ( ID id ) ; v o id d e le t e ( T e n t it y ) ; v o i d d e l e t e ( I t e r a b l e <? e x t e n d s T > e n t i t i e s ) ; v o id d e le t e A ll( ) ; }
  • 32. Spring Data Repositories p u b l i c i n t e r f a c e R e p o s i t o r y <T , I D e x t e n d s S e r i a l i z a b l e > { } p u b l i c i n t e r f a c e C r u d R e p o s i t o r y <T , I D e x t e n d s S e r i a l i z a b l e > e x t e n d s R e p o s i t o r y <T , I D > { T s a v e ( T e n t it y ) ; I t e r a b l e <T > s a v e ( I t e r a b l e <? e x t e n d s T > e n t i t i e s ) ; T f in d O n e ( ID id ) ; b o o le a n e x is t s ( ID id ) ; I t e r a b l e <T > f i n d A l l ( ) ; lo n g c o u n t ( ) ; v o id d e le t e ( ID id ) ; v o id d e le t e ( T e n t it y ) ; v o i d d e l e t e ( I t e r a b l e <? e x t e n d s T > e n t i t i e s ) ; v o id d e le t e A ll( ) ; }
  • 33. Spring Security 3.1  Multiple http elements  Stateless authentication  Improved Active Directory LDAP support  Crypto Module.  Disabling UI security (for testing purposes)  Erasing credentials after successful authentication  Clearing cookies on logout  Support arbitrary implementations of JAAS Configuration 33
  • 34. Spring Security: Project Organization Luke Taylor (VMW), Rob Winch Core Spring Security Web  3.1.0 released  Stable, mature Ryan Heaton, ... Dave Syer (VMW), LDAP OpenID Spring Security OAuth Spring Extensions: Security Vladimir Schaefer, Keith Donald, Mike Wiesner (VMW) OAuth2 Craig Walls (VMW) OAuth1a SAML Kerberos Spring Social  Oauth2 spec not yet final  External lead  1.0.0 not yet released  1.0.0 released  Partly external, low-activity  1.0.0.M6 release in pipeline  Consumer for well- known providers CONFIDENTIAL 34
  • 35. github.com/joshlong/a-walking-tour-of-spring-31/ Questions? Say hi on Twitter: @starbuxman @springsource NOT CONFIDENTIAL -- TELL EVERYONE

Notas do Editor

  1. Hello, thank you or having me. Im pleased to have the opportunity to introduce you today to Spring and the SpringSource Tool Suite My anem is Josh Long. I serve as the developer advocate for the Spring framework. I’ve used it in earnest and advocated it for many years now. i’m an author on 3 books on the technology, as well as a comitter to many of the Spring projects. Additionally, I take community activism very seriously and do my best to participate in the community. Sometimes this means answering question on Twitter, or in the forums, or helping contribute to the InfoQ.com and Artima.com communities