SlideShare a Scribd company logo
Spring Framework 3.2
What‟s New? What‟s Coming?




Sam Brannen
@sam_brannen


JUG.ch | Zurich | 22 January 2013
Sam Brannen

• Spring and Java Consultant @ Swiftmind

• Developing Java for over 15 years

• Spring Framework Core Committer since 2007

• Spring Trainer

• Lead author of Spring Distilled (O‟Reilly)

• Presenter on Spring, Java, OSGi, and testing

                                                 2
Swiftmind

Your Experts for Enterprise Java

Experienced consultants with in-depth knowledge of:

    –   Spring
    –   Java EE
    –   OSGi
    –   Agile project methodologies
    –   Software engineering best practices

•   Headquarters: Zurich, Switzerland

•   http://www.swiftmind.com

                                                      3
A Show of Hands…




                   4
Agenda

•   Major Themes in 3.2
•   Community and Contributions
•   Spring MVC Updates
•   Spring TestContext Framework Updates
•   Spring MVC Test Framework
•   4.0 Roadmap
•   Q&A




                                           5
Major Themes in 3.2

• Build system and source control changes

• Java 7 with inlined ASM 4.0 and CGLIB 3.0
• Composable injection annotations
• Early JCache (JSR-107) support

• Async MVC processing on Servlet 3.0
• REST support refinements

• Testing web apps and Spring MVC Test Framework

• Several runtime and performance refinements

                                                   6
Java SE 7

• Spring 3.1 came with early support for Java 7
   – JDBC 4.1, ForkJoinPool, etc.
   – framework itself still compiled on Java 6

• Spring 3.2 is now being built on OpenJDK 7
   – with fine-tuning for Java 7 based tests, etc.
   – retaining compatibility with Java 5 & 6




                                                     7
ASM 4.0 & CGLIB 3.0

• Spring 3.2 comes with ASM 4.0 and CGLIB 3.0

   – fully supporting the Java 7 byte code format

   – ASM and CGLIB are now inlined into Spring module
     jars




                                                        8
Composable Injection Annotations

•   Meta-annotations work for @Autowired, @Value, and @Bean as well

@Autowired @MyQualifier
@Retention(RetentionPolicy.RUNTIME)
public @interface MyAutowired {}

@Value("#{systemProperties.myPort}")
@Retention(RetentionPolicy.RUNTIME)
public @interface MyPort {}

@Bean @MyQualifier @Lazy
@Retention(RetentionPolicy.RUNTIME)
public @interface MyBean {}


                                                                      9
Early JCache Support

• Aligned with Spring's cache abstraction
   – Built against JCache 0.5 (JSR-107 draft)

• JCacheCacheManager and JCacheManagerFactoryBean
   – next to spiced-up versions of our
     EhCacheCacheManager

• No out-of-the-box support for native JCache annotations
  yet
   – planned for 2013, once the JCache specification is final



                                                                10
Community and Contributions




                              11
Big Infrastructure Changes

• Moved Spring Framework sources from self-hosted
  Subversion to Git/GitHub

• Migrated from Spring Build (i.e., Ant + Ivy) to Gradle

• New SpringSource Artifactory repository
   – http://repo.springsource.org
   – https://github.com/SpringSource/spring-
     framework/wiki/SpringSource-repository-FAQ




                                                           12
GitHub Repositories




                      13
GitHub – Timeline

• Dec 2011: Spring Framework moved to GitHub

• Dec 2012: 600+ forks; 200+ pull requests (thank you!)




                                                          14
Ways to Contribute (1/4)

• Answering questions on the Spring Forums and
  StackOverflow

   – A great way to help others and build your own
     reputation




                                                     15
Spring on StackOverflow




                          16
Ways to Contribute (2/4)

• Submitting bug reports

  – Because we can't fix what we don‟t know is broken!



• Suggesting new features or improvements




                                                         17
Ways to Contribute (3/4)

• Trying out new features in snapshots, milestones, and
  release candidates

   – Providing critical feedback for the team towards the
     next major version




                                                          18
Snapshot, Milestone, & RC Artifacts




                                      19
Ways to Contribute (4/4)

• Contributing code

   – To “scratch your own itch”

   – To get (much!) more familiar with the framework

   – To build your own reputation




                                                       20
Building from Source

Gradle build makes building from source dead simple

• git and JDK 7 are the only requirements

• clone the repo; run `./gradlew build`

• built-in scripts help with importing sources into
  Eclipse/STS or IDEA

• https://github.com/SpringSource/spring-
  framework/#building-from-source


                                                      21
Submitting Pull Requests

Pull Requests are a big help

• Much better than traditional patches

• https://github.com/SpringSource/springframework/blob/
  master/CONTRIBUTING.md




                                                          22
Reproducing Issues

New spring-framework-issues repository

• Submit “reproduction projects” that demonstrate JIRA
  issues

• See https://github.com/SpringSource/spring-framework-
  issues#readme




                                                          23
Contributions are Welcome!

• Interested in contributing?
• Want to know which issues are best to work on?

• See the new Contributions Welcome fixVersion in SPR
  JIRA

• We‟ll add issues here that we think are great candidates
  for community contribution




                                                             24
Contributions Welcome




                        25
Staying Informed

• Stay in touch with the team via Twitter
   – https://twitter.com/springframework
   – https://twitter.com/springframework/team/members


• Subscribe to the SpringSource Newsletter
   – http://www.springsource.org/newsletter-subscription


• Spring Framework Contributors Google Group
   – https://groups.google.com/forum/#!forum/spring-
     framework-contrib




                                                           26
Spring MVC Updates




                     27
Servlet 3 Async Support

• What?
  – Separate processing from Servlet container thread

• How?
   – Start async processing via request.startAsync()
   – Exit container thread
   – Compute in another thread
   – Dispatch to container to complete processing

• Why?
  – Support for long running requests – e.g. long polling
  – Increased throughput

                                                            28
Spring MVC – Servlet 3 Async Support

New controller method return value types:

• java.util.Callable<?>
   – Actual return value to be obtained via Callable
   – Spring MVC invokes Callable in separate thread

• org.springframework.web.*.DeferredResult<?>
   – Actual return value to be set on the DeferredResult
   – Application sets DeferredResult from a thread of its
     choice



                                                            29
java.util.Callable<?>

•   Before:



•   After:




•   Do the same with any controller return value type
     – String, ModelAndView, ResponseEntity<?>, …

                                                        30
org.sfw.web.*.DeferredResult<?>

• Create and save a DeferredResult:




• Set the deferred result to complete processing:




                                                    31
Server-side Push via Long Polling

•   Browser sends a request
•   Controller method returns a DeferredResult
•   Servlet container thread is exited but response is open
•   External event takes place – e.g. JMS, AMQP notification
•   DeferredResult is set
•   Request is dispatched back to Servlet container
•   Processing resumes and completes


    See blog post on real-time update techniques:
    http://bit.ly/IWxRhI


                                                               32
Servlet 3 Async Configuration

• Set async-supported flag on Servlet and all filters
   – <async-supported>true</async-supported>



• Set <dispatcher> element on filter-mapping
   – <dispatcher>REQUEST, ASYNC, FORWARD</dispatcher>




                                                        33
Spring MVC Servlet 3 Async – Resources

• Blog post series
   – http://bit.ly/JIZwSV

• Samples
   – https://github.com/SpringSource/spring-mvc-showcase
   – https://github.com/rstoyanchev/spring-mvc-chat
   – http://bit.ly/VMLLuL … Spring AMQP stocks sample

• Reference documentation
   – http://bit.ly/UZzvsi




                                                           34
WebApplicationInitializer Base Classes




                                         35
Content Negotiation Options

•   Content negotiation via file extension, Accept
    header, request parameter, default value, or a custom
    strategy throughout Spring MVC

•   Choose which strategies to use and in what order

•   Configured once in MVC Java config or MVC namespace
     – “.json” and “.xml” extensions automatically enabled

•   May configure HandlerMapping/Adapter and
    ExceptionResolver via
    ContentNegotiationManagerFactoryBean


    For further details see: http://bit.ly/10cCcuG
                                                             36
Global Error Reporting

• Need an application–wide strategy for writing error details
  to the response body?

• Wishing there were a global @ExceptionHandler method?

• Well, now there is!




                                                            37
Matrix Variables

•   Parameters embedded in URI path segments
     – GET /pets/42;q=21

•   Use URI variable where semi-colon content expected
     – /pets/{petId}

•   Extract via annotation
     – @PathVariable String petId, @MatrixVariable int q

•   Some configuration required to enable unless using MVC
    Java config and MVC namespace


    For further details see: http://bit.ly/WBm2ov

                                                             38
Spring TestContext Framework Updates




                                       39
What‟s New in the Spring TCF?

• Upgraded to JUnit 4.11 and TestNG 6.5.2

• Loading WebApplicationContexts

• Testing request- and session-scoped beans

• Support for ApplicationContextInitializers

• Loading context hierarchies (3.2.1)

• And more… (see presentation from SpringOne 2GX 2012)

                                                         40
Loading a WebApplicationContext

• Q: How do you tell the TestContext Framework to load a
  WebApplicationContext?

• A: Just annotate your test class with
  @WebAppConfiguration!




                                                           41
@WebAppConfiguration

• Denotes that the context should be a
  WebApplicationContext

• Configures the resource path for the web app
   – Used by MockServletContext
   – Defaults to “src/main/webapp”
   – Paths are file-system folders, relative to the project
     root not classpath resources
   – The classpath: prefix is also supported




                                                              42
Example: @WebAppConfiguration




                                43
Example: @WebAppConfiguration




                                44
Example: @WebAppConfiguration




                                45
ServletTestExecutionListener

• Sets up default thread-local state via
  RequestContextHolder before each test method

• Creates:
   – MockHttpServletRequest
   – MockHttpServletResponse
   – ServletWebRequest

• Ensures that the MockHttpServletResponse and
  ServletWebRequest can be injected into the test instance

• Cleans up thread-local state after each test method


                                                             46
Example: Injecting Mocks




                           47
Web Scopes – Review

• request: lifecycle tied to the current HttpServletRequest



• session: lifecycle tied to the current HttpSession




                                                              48
Example: Request-scoped Bean Config




                                      49
Example: Request-scoped Bean Test




                                    50
Example: Session-scoped Bean Config




                                      51
Example: Session-scoped Bean Test




                                    52
ApplicationContextInitalizer

• Introduced in Spring 3.1
• Used for programmatic initialization of a
  ConfigurableApplicationContext
• For example:
   – to register property sources
   – to activate profiles against the Environment
• Configured in web.xml by specifying
  contextInitializerClasses via
   – context-param for the ContextLoaderListener
   – init-param for the DispatcherServlet



                                                    53
Using Initializers in Tests

• Configured in @ContextConfiguration via the initializers
  attribute
• Inheritance can be controlled via the inheritInitializers
  attribute
• An ApplicationContextInitializer may configure the entire
  context
   – XML resource locations or annotated classes are no
      longer required
• Initializers are now part of the context cache key
• Initializers are ordered based on Spring's Ordered
  interface or the @Order annotation


                                                              54
Example: Multiple Initializers




                                 55
Application Context Hierarchies

• Currently only flat, non-hierarchical contexts are
  supported in tests.

• There‟s no easy way to create contexts with parent-child
  relationships.

• But… hierarchies are supported in production.

• Wouldn‟t it be nice if you could test them, too?!




                                                             56
Testing Context Hierarchies in 3.2.2

• New @ContextHierarchy annotation
   – Used in conjunction with @ContextConfiguration

• @ContextConfiguration now supports a „name‟ attribute
  – for merging and overriding hierarchy configuration




                                                          57
Single Test with Context Hierarchy




                                     58
Class and Context Hierarchies




                                59
Spring MVC Test Framework




                            60
What is Spring MVC Test?

• First class support for testing Spring MVC applications

• Fluent API

• Server-side tests involve the DispatcherServlet

• Client-side tests are RestTemplate based

• Built on spring-test and
  MockHttpServletRequest/Response

• Servlet container not required

                                                            61
Q: Unit or Integration Testing?




                                  62
A: A Bit of Both

• Integration tests for sure
• However…
   – no Servlet container
   – MockHttpServletRequest/Response
   – Controllers can be injected with mocks
• Also there are two setup options
   – Load WebApplicationContext as usual
   – Standalone setup … no Spring configuration, just
     controller instance!

• Controller unit testing ++

                                                        63
Server-side Test: webAppContextSetup




                                       64
Server-side Test: standaloneSetup




                                    65
Client-side Test




                   66
Spring MVC Test – Resources

• Blog post
  – http://bit.ly/QCKMzh

• Samples
  – https://github.com/SpringSource/spring-mvc-showcase
  – http://bit.ly/VN1bPw … sample server tests
  – http://bit.ly/13koRQP … sample client tests


• Reference documentation
  – http://bit.ly/SmUtD6




                                                          67
Roadmap for Spring 4.0




                         68
1st Class Support for Java 8 based apps

• Language features such as lambda expressions
   – for callbacks with templates
   – for concurrent execution
       • think fork/join, map/reduce, etc.

• APIs such as JSR-310 Date and Time
   – Alongside Spring‟s existing support for JodaTime




                                                        69
Configuring Spring with Groovy 2

• Configuring and implementing Spring-style applications
  using Groovy 2.x

• Groovy-based bean definitions

• Groovy as the language of choice for an entire
  application, as a direct and straightforward alternative to
  Java source files

• Groovy 2.0's static compilation support completes the
  picture here


                                                                70
Support for Key Java EE 7 Technologies

• JMS 2.0

• JPA 2.1

• Bean Validation 1.1

• Servlet 3.1

• And fully covering JCache 1.0




                                         71
Enabling WebSocket-style Architectures

• Support for JSR-356 compliant runtimes

• Also supporting related technologies




                                           72
Fine-grained Eventing and Messaging

• Introducing fine-grained eventing and messaging within
  the application

• Building on our existing application event mechanism

• Aligned with our JMS message listener mechanism




                                                           73
Pruning and Dependency Upgrades

• Removing a variety of deprecated packages across the
  framework
   – See Spring Framework 3.2's deprecations!

• Raising minimum dependencies to Java 6+
   – Java SE 6+ and Java EE 6+
   – with some compromises for EE 5++ servers




                                                         74
In Closing…




              75
Special Thanks to…

• Juergen Hoeller

• Chris Beams

• Rossen Stoyanchev

… for permitting reuse of some of their content in this presentation!




                                                                    76
Further Resources

• Spring Framework
   – http://www.springsource.org/spring-framework
   – Spring Reference Manual
   – Javadoc
• Spring Forums
   – http://forum.springframework.org
• Spring JIRA
   – http://jira.springframework.org
• Spring on GitHub
   – https://github.com/SpringSource/spring-framework



                                                        77
Blogs

• SpringSource Team Blog
   – http://blog.springsource.com/

• Swiftmind Team Blog
   – http://www.swiftmind.com/blog/




                                      78
Q&A

Sam Brannen

twitter: @sam_brannen
www.slideshare.net/sbrannen
www.swiftmind.com




                              79

More Related Content

What's hot

Apache maven and its impact on java 9 (Java One 2017)
Apache maven and its impact on java 9 (Java One 2017)Apache maven and its impact on java 9 (Java One 2017)
Apache maven and its impact on java 9 (Java One 2017)
Robert Scholte
 
Java EE 8
Java EE 8Java EE 8
Java EE 8
Ryan Cuprak
 
Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)
Summer Lu
 
Maven 3 Overview
Maven 3  OverviewMaven 3  Overview
Maven 3 Overview
Mike Ensor
 
Batching and Java EE (jdk.io)
Batching and Java EE (jdk.io)Batching and Java EE (jdk.io)
Batching and Java EE (jdk.io)
Ryan Cuprak
 
Apache Maven 2 Part 2
Apache Maven 2 Part 2Apache Maven 2 Part 2
Apache Maven 2 Part 2
Return on Intelligence
 
Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - Explained
Smita Prasad
 
JSF2
JSF2JSF2
Testing Spring Boot Applications
Testing Spring Boot ApplicationsTesting Spring Boot Applications
Testing Spring Boot Applications
VMware Tanzu
 
Apache Maven In 10 Slides
Apache Maven In 10 SlidesApache Maven In 10 Slides
Apache Maven In 10 Slides
Robert Burrell Donkin
 
Maven tutorial
Maven tutorialMaven tutorial
Maven tutorial
Dragos Balan
 
Apache maven 2 overview
Apache maven 2 overviewApache maven 2 overview
Apache maven 2 overview
Return on Intelligence
 
Maven for Dummies
Maven for DummiesMaven for Dummies
Maven for Dummies
Tomer Gabel
 
Maven ppt
Maven pptMaven ppt
Maven ppt
natashasweety7
 
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDev
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDevTriple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDev
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDev
Werner Keil
 
Learning Maven by Example
Learning Maven by ExampleLearning Maven by Example
Learning Maven by Example
Hsi-Kai Wang
 
Overview of PaaS: Java experience
Overview of PaaS: Java experienceOverview of PaaS: Java experience
Overview of PaaS: Java experience
Alex Tumanoff
 
Maven
Maven Maven
Maven
Khan625
 
Scala and Play with Gradle
Scala and Play with GradleScala and Play with Gradle
Scala and Play with Gradle
Wei Chen
 
Maven advanced
Maven advancedMaven advanced
Maven advanced
Smita Prasad
 

What's hot (20)

Apache maven and its impact on java 9 (Java One 2017)
Apache maven and its impact on java 9 (Java One 2017)Apache maven and its impact on java 9 (Java One 2017)
Apache maven and its impact on java 9 (Java One 2017)
 
Java EE 8
Java EE 8Java EE 8
Java EE 8
 
Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)Workshop Framework(J2EE/OSGi/RCP)
Workshop Framework(J2EE/OSGi/RCP)
 
Maven 3 Overview
Maven 3  OverviewMaven 3  Overview
Maven 3 Overview
 
Batching and Java EE (jdk.io)
Batching and Java EE (jdk.io)Batching and Java EE (jdk.io)
Batching and Java EE (jdk.io)
 
Apache Maven 2 Part 2
Apache Maven 2 Part 2Apache Maven 2 Part 2
Apache Maven 2 Part 2
 
Maven Basics - Explained
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - Explained
 
JSF2
JSF2JSF2
JSF2
 
Testing Spring Boot Applications
Testing Spring Boot ApplicationsTesting Spring Boot Applications
Testing Spring Boot Applications
 
Apache Maven In 10 Slides
Apache Maven In 10 SlidesApache Maven In 10 Slides
Apache Maven In 10 Slides
 
Maven tutorial
Maven tutorialMaven tutorial
Maven tutorial
 
Apache maven 2 overview
Apache maven 2 overviewApache maven 2 overview
Apache maven 2 overview
 
Maven for Dummies
Maven for DummiesMaven for Dummies
Maven for Dummies
 
Maven ppt
Maven pptMaven ppt
Maven ppt
 
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDev
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDevTriple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDev
Triple E class DevOps with Hudson, Maven, Kokki/Multiconf and PyDev
 
Learning Maven by Example
Learning Maven by ExampleLearning Maven by Example
Learning Maven by Example
 
Overview of PaaS: Java experience
Overview of PaaS: Java experienceOverview of PaaS: Java experience
Overview of PaaS: Java experience
 
Maven
Maven Maven
Maven
 
Scala and Play with Gradle
Scala and Play with GradleScala and Play with Gradle
Scala and Play with Gradle
 
Maven advanced
Maven advancedMaven advanced
Maven advanced
 

Similar to Spring Framework 3.2 - What's New

Testing Spring MVC and REST Web Applications
Testing Spring MVC and REST Web ApplicationsTesting Spring MVC and REST Web Applications
Testing Spring MVC and REST Web Applications
Sam Brannen
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
Henry S
 
CTS2 Development Framework
CTS2 Development FrameworkCTS2 Development Framework
CTS2 Development Framework
cts2framework
 
The Need For Speed - NxtGen Cambridge
The Need For Speed - NxtGen CambridgeThe Need For Speed - NxtGen Cambridge
The Need For Speed - NxtGen Cambridge
Phil Pursglove
 
Velocity - Edge UG
Velocity - Edge UGVelocity - Edge UG
Velocity - Edge UG
Phil Pursglove
 
Short-Training asp.net vNext
Short-Training asp.net vNextShort-Training asp.net vNext
Short-Training asp.net vNext
Betclic Everest Group Tech Team
 
Continuous Deployment of your Application @jSession#5
Continuous Deployment of your Application @jSession#5Continuous Deployment of your Application @jSession#5
Continuous Deployment of your Application @jSession#5
Marcin Grzejszczak
 
The Need For Speed - NEBytes
The Need For Speed - NEBytesThe Need For Speed - NEBytes
The Need For Speed - NEBytes
Phil Pursglove
 
Kafka for Microservices – You absolutely need Avro Schemas! | Gerardo Gutierr...
Kafka for Microservices – You absolutely need Avro Schemas! | Gerardo Gutierr...Kafka for Microservices – You absolutely need Avro Schemas! | Gerardo Gutierr...
Kafka for Microservices – You absolutely need Avro Schemas! | Gerardo Gutierr...
HostedbyConfluent
 
Spring Boot
Spring BootSpring Boot
Spring Boot
koppenolski
 
Spring Cloud: API gateway upgrade & configuration in the cloud
Spring Cloud: API gateway upgrade & configuration in the cloudSpring Cloud: API gateway upgrade & configuration in the cloud
Spring Cloud: API gateway upgrade & configuration in the cloud
Orkhan Gasimov
 
Continuous Deployment To The Cloud @DevoxxPL 2017
Continuous Deployment To The Cloud @DevoxxPL 2017 Continuous Deployment To The Cloud @DevoxxPL 2017
Continuous Deployment To The Cloud @DevoxxPL 2017
Marcin Grzejszczak
 
Sitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixSitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helix
Peter Nazarov
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
Serhat Can
 
DevOps: Automate all the things
DevOps: Automate all the thingsDevOps: Automate all the things
DevOps: Automate all the things
Mat Mannion
 
Fast Track introduction to ASP.NET MVC
Fast Track introduction to ASP.NET MVCFast Track introduction to ASP.NET MVC
Fast Track introduction to ASP.NET MVC
Ankit Kashyap
 
The Need for Speed - EpiCenter 2010
The Need for Speed - EpiCenter 2010The Need for Speed - EpiCenter 2010
The Need for Speed - EpiCenter 2010
Phil Pursglove
 
Phil Pursglove: Velocity, the Need for Speed - epicenter 2010
Phil Pursglove: Velocity, the Need for Speed - epicenter 2010Phil Pursglove: Velocity, the Need for Speed - epicenter 2010
Phil Pursglove: Velocity, the Need for Speed - epicenter 2010
IrishDev.com
 
Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19
Markus Eisele
 
Composable Software Architecture with Spring
Composable Software Architecture with SpringComposable Software Architecture with Spring
Composable Software Architecture with Spring
Sam Brannen
 

Similar to Spring Framework 3.2 - What's New (20)

Testing Spring MVC and REST Web Applications
Testing Spring MVC and REST Web ApplicationsTesting Spring MVC and REST Web Applications
Testing Spring MVC and REST Web Applications
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
 
CTS2 Development Framework
CTS2 Development FrameworkCTS2 Development Framework
CTS2 Development Framework
 
The Need For Speed - NxtGen Cambridge
The Need For Speed - NxtGen CambridgeThe Need For Speed - NxtGen Cambridge
The Need For Speed - NxtGen Cambridge
 
Velocity - Edge UG
Velocity - Edge UGVelocity - Edge UG
Velocity - Edge UG
 
Short-Training asp.net vNext
Short-Training asp.net vNextShort-Training asp.net vNext
Short-Training asp.net vNext
 
Continuous Deployment of your Application @jSession#5
Continuous Deployment of your Application @jSession#5Continuous Deployment of your Application @jSession#5
Continuous Deployment of your Application @jSession#5
 
The Need For Speed - NEBytes
The Need For Speed - NEBytesThe Need For Speed - NEBytes
The Need For Speed - NEBytes
 
Kafka for Microservices – You absolutely need Avro Schemas! | Gerardo Gutierr...
Kafka for Microservices – You absolutely need Avro Schemas! | Gerardo Gutierr...Kafka for Microservices – You absolutely need Avro Schemas! | Gerardo Gutierr...
Kafka for Microservices – You absolutely need Avro Schemas! | Gerardo Gutierr...
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Spring Cloud: API gateway upgrade & configuration in the cloud
Spring Cloud: API gateway upgrade & configuration in the cloudSpring Cloud: API gateway upgrade & configuration in the cloud
Spring Cloud: API gateway upgrade & configuration in the cloud
 
Continuous Deployment To The Cloud @DevoxxPL 2017
Continuous Deployment To The Cloud @DevoxxPL 2017 Continuous Deployment To The Cloud @DevoxxPL 2017
Continuous Deployment To The Cloud @DevoxxPL 2017
 
Sitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixSitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helix
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
DevOps: Automate all the things
DevOps: Automate all the thingsDevOps: Automate all the things
DevOps: Automate all the things
 
Fast Track introduction to ASP.NET MVC
Fast Track introduction to ASP.NET MVCFast Track introduction to ASP.NET MVC
Fast Track introduction to ASP.NET MVC
 
The Need for Speed - EpiCenter 2010
The Need for Speed - EpiCenter 2010The Need for Speed - EpiCenter 2010
The Need for Speed - EpiCenter 2010
 
Phil Pursglove: Velocity, the Need for Speed - epicenter 2010
Phil Pursglove: Velocity, the Need for Speed - epicenter 2010Phil Pursglove: Velocity, the Need for Speed - epicenter 2010
Phil Pursglove: Velocity, the Need for Speed - epicenter 2010
 
Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19
 
Composable Software Architecture with Spring
Composable Software Architecture with SpringComposable Software Architecture with Spring
Composable Software Architecture with Spring
 

More from Sam Brannen

Testing with Spring, AOT, GraalVM, and JUnit 5 - Spring I/O 2023
Testing with Spring, AOT, GraalVM, and JUnit 5 - Spring I/O 2023Testing with Spring, AOT, GraalVM, and JUnit 5 - Spring I/O 2023
Testing with Spring, AOT, GraalVM, and JUnit 5 - Spring I/O 2023
Sam Brannen
 
Testing with JUnit 5 and Spring - Spring I/O 2022
Testing with JUnit 5 and Spring - Spring I/O 2022Testing with JUnit 5 and Spring - Spring I/O 2022
Testing with JUnit 5 and Spring - Spring I/O 2022
Sam Brannen
 
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019JUnit 5 - Evolution and Innovation - SpringOne Platform 2019
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019
Sam Brannen
 
JUnit 5: What's New and What's Coming - Spring I/O 2019
JUnit 5: What's New and What's Coming - Spring I/O 2019JUnit 5: What's New and What's Coming - Spring I/O 2019
JUnit 5: What's New and What's Coming - Spring I/O 2019
Sam Brannen
 
JUnit 5 - New Opportunities for Testing on the JVM
JUnit 5 - New Opportunities for Testing on the JVMJUnit 5 - New Opportunities for Testing on the JVM
JUnit 5 - New Opportunities for Testing on the JVM
Sam Brannen
 
Get the Most out of Testing with Spring 4.2
Get the Most out of Testing with Spring 4.2Get the Most out of Testing with Spring 4.2
Get the Most out of Testing with Spring 4.2
Sam Brannen
 
JUnit 5 - from Lambda to Alpha and beyond
JUnit 5 - from Lambda to Alpha and beyondJUnit 5 - from Lambda to Alpha and beyond
JUnit 5 - from Lambda to Alpha and beyond
Sam Brannen
 
Testing with Spring 4.x
Testing with Spring 4.xTesting with Spring 4.x
Testing with Spring 4.x
Sam Brannen
 
Testing Web Apps with Spring Framework 3.2
Testing Web Apps with Spring Framework 3.2Testing Web Apps with Spring Framework 3.2
Testing Web Apps with Spring Framework 3.2
Sam Brannen
 
Spring Framework 4.0 to 4.1
Spring Framework 4.0 to 4.1Spring Framework 4.0 to 4.1
Spring Framework 4.0 to 4.1
Sam Brannen
 
Spring Framework 4.0 - The Next Generation - Soft-Shake 2013
Spring Framework 4.0 - The Next Generation - Soft-Shake 2013Spring Framework 4.0 - The Next Generation - Soft-Shake 2013
Spring Framework 4.0 - The Next Generation - Soft-Shake 2013
Sam Brannen
 
Spring 3.1 and MVC Testing Support - 4Developers
Spring 3.1 and MVC Testing Support - 4DevelopersSpring 3.1 and MVC Testing Support - 4Developers
Spring 3.1 and MVC Testing Support - 4Developers
Sam Brannen
 
Effective out-of-container Integration Testing - 4Developers
Effective out-of-container Integration Testing - 4DevelopersEffective out-of-container Integration Testing - 4Developers
Effective out-of-container Integration Testing - 4Developers
Sam Brannen
 
Spring 3.1 to 3.2 in a Nutshell - SDC2012
Spring 3.1 to 3.2 in a Nutshell - SDC2012Spring 3.1 to 3.2 in a Nutshell - SDC2012
Spring 3.1 to 3.2 in a Nutshell - SDC2012
Sam Brannen
 
Spring 3.1 and MVC Testing Support
Spring 3.1 and MVC Testing SupportSpring 3.1 and MVC Testing Support
Spring 3.1 and MVC Testing Support
Sam Brannen
 
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
Sam Brannen
 
Spring 3.1 in a Nutshell
Spring 3.1 in a NutshellSpring 3.1 in a Nutshell
Spring 3.1 in a Nutshell
Sam Brannen
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
Sam Brannen
 
Effective out-of-container Integration Testing
Effective out-of-container Integration TestingEffective out-of-container Integration Testing
Effective out-of-container Integration Testing
Sam Brannen
 
What's New in Spring 3.0
What's New in Spring 3.0What's New in Spring 3.0
What's New in Spring 3.0
Sam Brannen
 

More from Sam Brannen (20)

Testing with Spring, AOT, GraalVM, and JUnit 5 - Spring I/O 2023
Testing with Spring, AOT, GraalVM, and JUnit 5 - Spring I/O 2023Testing with Spring, AOT, GraalVM, and JUnit 5 - Spring I/O 2023
Testing with Spring, AOT, GraalVM, and JUnit 5 - Spring I/O 2023
 
Testing with JUnit 5 and Spring - Spring I/O 2022
Testing with JUnit 5 and Spring - Spring I/O 2022Testing with JUnit 5 and Spring - Spring I/O 2022
Testing with JUnit 5 and Spring - Spring I/O 2022
 
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019JUnit 5 - Evolution and Innovation - SpringOne Platform 2019
JUnit 5 - Evolution and Innovation - SpringOne Platform 2019
 
JUnit 5: What's New and What's Coming - Spring I/O 2019
JUnit 5: What's New and What's Coming - Spring I/O 2019JUnit 5: What's New and What's Coming - Spring I/O 2019
JUnit 5: What's New and What's Coming - Spring I/O 2019
 
JUnit 5 - New Opportunities for Testing on the JVM
JUnit 5 - New Opportunities for Testing on the JVMJUnit 5 - New Opportunities for Testing on the JVM
JUnit 5 - New Opportunities for Testing on the JVM
 
Get the Most out of Testing with Spring 4.2
Get the Most out of Testing with Spring 4.2Get the Most out of Testing with Spring 4.2
Get the Most out of Testing with Spring 4.2
 
JUnit 5 - from Lambda to Alpha and beyond
JUnit 5 - from Lambda to Alpha and beyondJUnit 5 - from Lambda to Alpha and beyond
JUnit 5 - from Lambda to Alpha and beyond
 
Testing with Spring 4.x
Testing with Spring 4.xTesting with Spring 4.x
Testing with Spring 4.x
 
Testing Web Apps with Spring Framework 3.2
Testing Web Apps with Spring Framework 3.2Testing Web Apps with Spring Framework 3.2
Testing Web Apps with Spring Framework 3.2
 
Spring Framework 4.0 to 4.1
Spring Framework 4.0 to 4.1Spring Framework 4.0 to 4.1
Spring Framework 4.0 to 4.1
 
Spring Framework 4.0 - The Next Generation - Soft-Shake 2013
Spring Framework 4.0 - The Next Generation - Soft-Shake 2013Spring Framework 4.0 - The Next Generation - Soft-Shake 2013
Spring Framework 4.0 - The Next Generation - Soft-Shake 2013
 
Spring 3.1 and MVC Testing Support - 4Developers
Spring 3.1 and MVC Testing Support - 4DevelopersSpring 3.1 and MVC Testing Support - 4Developers
Spring 3.1 and MVC Testing Support - 4Developers
 
Effective out-of-container Integration Testing - 4Developers
Effective out-of-container Integration Testing - 4DevelopersEffective out-of-container Integration Testing - 4Developers
Effective out-of-container Integration Testing - 4Developers
 
Spring 3.1 to 3.2 in a Nutshell - SDC2012
Spring 3.1 to 3.2 in a Nutshell - SDC2012Spring 3.1 to 3.2 in a Nutshell - SDC2012
Spring 3.1 to 3.2 in a Nutshell - SDC2012
 
Spring 3.1 and MVC Testing Support
Spring 3.1 and MVC Testing SupportSpring 3.1 and MVC Testing Support
Spring 3.1 and MVC Testing Support
 
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 3.1 in a Nutshell
Spring 3.1 in a NutshellSpring 3.1 in a Nutshell
Spring 3.1 in a Nutshell
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
 
Effective out-of-container Integration Testing
Effective out-of-container Integration TestingEffective out-of-container Integration Testing
Effective out-of-container Integration Testing
 
What's New in Spring 3.0
What's New in Spring 3.0What's New in Spring 3.0
What's New in Spring 3.0
 

Recently uploaded

Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptxIntroduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
313mohammedarshad
 
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
Priyanka Aash
 
Vulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive OverviewVulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive Overview
Steven Carlson
 
Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024
Nicolás Lopéz
 
Tailored CRM Software Development for Enhanced Customer Insights
Tailored CRM Software Development for Enhanced Customer InsightsTailored CRM Software Development for Enhanced Customer Insights
Tailored CRM Software Development for Enhanced Customer Insights
SynapseIndia
 
Google I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged SlidesGoogle I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged Slides
Google Developer Group - Harare
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
Priyanka Aash
 
Types of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technologyTypes of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technology
ldtexsolbl
 
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and DisadvantagesBLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
SAI KAILASH R
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
Adam Dunkels
 
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite SolutionIPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Networks
 
Opencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of MünsterOpencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of Münster
Matthias Neugebauer
 
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
maigasapphire
 
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
sunilverma7884
 
Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024
aakash malhotra
 
July Patch Tuesday
July Patch TuesdayJuly Patch Tuesday
July Patch Tuesday
Ivanti
 
What's new in android: jetpack compose 2024
What's new in android: jetpack compose 2024What's new in android: jetpack compose 2024
What's new in android: jetpack compose 2024
Toru Wonyoung Choi
 
Patch Tuesday de julio
Patch Tuesday de julioPatch Tuesday de julio
Patch Tuesday de julio
Ivanti
 
Sonkoloniya documentation - ONEprojukti.pdf
Sonkoloniya documentation - ONEprojukti.pdfSonkoloniya documentation - ONEprojukti.pdf
Sonkoloniya documentation - ONEprojukti.pdf
SubhamMandal40
 

Recently uploaded (20)

Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptxIntroduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
 
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
(CISOPlatform Summit & SACON 2024) Gen AI & Deepfake In Overall Security.pdf
 
Vulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive OverviewVulnerability Management: A Comprehensive Overview
Vulnerability Management: A Comprehensive Overview
 
Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024Vertex AI Agent Builder - GDG Alicante - Julio 2024
Vertex AI Agent Builder - GDG Alicante - Julio 2024
 
Tailored CRM Software Development for Enhanced Customer Insights
Tailored CRM Software Development for Enhanced Customer InsightsTailored CRM Software Development for Enhanced Customer Insights
Tailored CRM Software Development for Enhanced Customer Insights
 
Google I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged SlidesGoogle I/O Extended Harare Merged Slides
Google I/O Extended Harare Merged Slides
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
 
Types of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technologyTypes of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technology
 
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and DisadvantagesBLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
BLOCKCHAIN TECHNOLOGY - Advantages and Disadvantages
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
 
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite SolutionIPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite Solution
 
Opencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of MünsterOpencast Summit 2024 — Opencast @ University of Münster
Opencast Summit 2024 — Opencast @ University of Münster
 
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
 
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
Girls call Kolkata 👀 XXXXXXXXXXX 👀 Rs.9.5 K Cash Payment With Room Delivery
 
Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024
 
July Patch Tuesday
July Patch TuesdayJuly Patch Tuesday
July Patch Tuesday
 
What's new in android: jetpack compose 2024
What's new in android: jetpack compose 2024What's new in android: jetpack compose 2024
What's new in android: jetpack compose 2024
 
Patch Tuesday de julio
Patch Tuesday de julioPatch Tuesday de julio
Patch Tuesday de julio
 
Sonkoloniya documentation - ONEprojukti.pdf
Sonkoloniya documentation - ONEprojukti.pdfSonkoloniya documentation - ONEprojukti.pdf
Sonkoloniya documentation - ONEprojukti.pdf
 

Spring Framework 3.2 - What's New

  • 1. Spring Framework 3.2 What‟s New? What‟s Coming? Sam Brannen @sam_brannen JUG.ch | Zurich | 22 January 2013
  • 2. Sam Brannen • Spring and Java Consultant @ Swiftmind • Developing Java for over 15 years • Spring Framework Core Committer since 2007 • Spring Trainer • Lead author of Spring Distilled (O‟Reilly) • Presenter on Spring, Java, OSGi, and testing 2
  • 3. Swiftmind Your Experts for Enterprise Java Experienced consultants with in-depth knowledge of: – Spring – Java EE – OSGi – Agile project methodologies – Software engineering best practices • Headquarters: Zurich, Switzerland • http://www.swiftmind.com 3
  • 4. A Show of Hands… 4
  • 5. Agenda • Major Themes in 3.2 • Community and Contributions • Spring MVC Updates • Spring TestContext Framework Updates • Spring MVC Test Framework • 4.0 Roadmap • Q&A 5
  • 6. Major Themes in 3.2 • Build system and source control changes • Java 7 with inlined ASM 4.0 and CGLIB 3.0 • Composable injection annotations • Early JCache (JSR-107) support • Async MVC processing on Servlet 3.0 • REST support refinements • Testing web apps and Spring MVC Test Framework • Several runtime and performance refinements 6
  • 7. Java SE 7 • Spring 3.1 came with early support for Java 7 – JDBC 4.1, ForkJoinPool, etc. – framework itself still compiled on Java 6 • Spring 3.2 is now being built on OpenJDK 7 – with fine-tuning for Java 7 based tests, etc. – retaining compatibility with Java 5 & 6 7
  • 8. ASM 4.0 & CGLIB 3.0 • Spring 3.2 comes with ASM 4.0 and CGLIB 3.0 – fully supporting the Java 7 byte code format – ASM and CGLIB are now inlined into Spring module jars 8
  • 9. Composable Injection Annotations • Meta-annotations work for @Autowired, @Value, and @Bean as well @Autowired @MyQualifier @Retention(RetentionPolicy.RUNTIME) public @interface MyAutowired {} @Value("#{systemProperties.myPort}") @Retention(RetentionPolicy.RUNTIME) public @interface MyPort {} @Bean @MyQualifier @Lazy @Retention(RetentionPolicy.RUNTIME) public @interface MyBean {} 9
  • 10. Early JCache Support • Aligned with Spring's cache abstraction – Built against JCache 0.5 (JSR-107 draft) • JCacheCacheManager and JCacheManagerFactoryBean – next to spiced-up versions of our EhCacheCacheManager • No out-of-the-box support for native JCache annotations yet – planned for 2013, once the JCache specification is final 10
  • 12. Big Infrastructure Changes • Moved Spring Framework sources from self-hosted Subversion to Git/GitHub • Migrated from Spring Build (i.e., Ant + Ivy) to Gradle • New SpringSource Artifactory repository – http://repo.springsource.org – https://github.com/SpringSource/spring- framework/wiki/SpringSource-repository-FAQ 12
  • 14. GitHub – Timeline • Dec 2011: Spring Framework moved to GitHub • Dec 2012: 600+ forks; 200+ pull requests (thank you!) 14
  • 15. Ways to Contribute (1/4) • Answering questions on the Spring Forums and StackOverflow – A great way to help others and build your own reputation 15
  • 17. Ways to Contribute (2/4) • Submitting bug reports – Because we can't fix what we don‟t know is broken! • Suggesting new features or improvements 17
  • 18. Ways to Contribute (3/4) • Trying out new features in snapshots, milestones, and release candidates – Providing critical feedback for the team towards the next major version 18
  • 19. Snapshot, Milestone, & RC Artifacts 19
  • 20. Ways to Contribute (4/4) • Contributing code – To “scratch your own itch” – To get (much!) more familiar with the framework – To build your own reputation 20
  • 21. Building from Source Gradle build makes building from source dead simple • git and JDK 7 are the only requirements • clone the repo; run `./gradlew build` • built-in scripts help with importing sources into Eclipse/STS or IDEA • https://github.com/SpringSource/spring- framework/#building-from-source 21
  • 22. Submitting Pull Requests Pull Requests are a big help • Much better than traditional patches • https://github.com/SpringSource/springframework/blob/ master/CONTRIBUTING.md 22
  • 23. Reproducing Issues New spring-framework-issues repository • Submit “reproduction projects” that demonstrate JIRA issues • See https://github.com/SpringSource/spring-framework- issues#readme 23
  • 24. Contributions are Welcome! • Interested in contributing? • Want to know which issues are best to work on? • See the new Contributions Welcome fixVersion in SPR JIRA • We‟ll add issues here that we think are great candidates for community contribution 24
  • 26. Staying Informed • Stay in touch with the team via Twitter – https://twitter.com/springframework – https://twitter.com/springframework/team/members • Subscribe to the SpringSource Newsletter – http://www.springsource.org/newsletter-subscription • Spring Framework Contributors Google Group – https://groups.google.com/forum/#!forum/spring- framework-contrib 26
  • 28. Servlet 3 Async Support • What? – Separate processing from Servlet container thread • How? – Start async processing via request.startAsync() – Exit container thread – Compute in another thread – Dispatch to container to complete processing • Why? – Support for long running requests – e.g. long polling – Increased throughput 28
  • 29. Spring MVC – Servlet 3 Async Support New controller method return value types: • java.util.Callable<?> – Actual return value to be obtained via Callable – Spring MVC invokes Callable in separate thread • org.springframework.web.*.DeferredResult<?> – Actual return value to be set on the DeferredResult – Application sets DeferredResult from a thread of its choice 29
  • 30. java.util.Callable<?> • Before: • After: • Do the same with any controller return value type – String, ModelAndView, ResponseEntity<?>, … 30
  • 31. org.sfw.web.*.DeferredResult<?> • Create and save a DeferredResult: • Set the deferred result to complete processing: 31
  • 32. Server-side Push via Long Polling • Browser sends a request • Controller method returns a DeferredResult • Servlet container thread is exited but response is open • External event takes place – e.g. JMS, AMQP notification • DeferredResult is set • Request is dispatched back to Servlet container • Processing resumes and completes See blog post on real-time update techniques: http://bit.ly/IWxRhI 32
  • 33. Servlet 3 Async Configuration • Set async-supported flag on Servlet and all filters – <async-supported>true</async-supported> • Set <dispatcher> element on filter-mapping – <dispatcher>REQUEST, ASYNC, FORWARD</dispatcher> 33
  • 34. Spring MVC Servlet 3 Async – Resources • Blog post series – http://bit.ly/JIZwSV • Samples – https://github.com/SpringSource/spring-mvc-showcase – https://github.com/rstoyanchev/spring-mvc-chat – http://bit.ly/VMLLuL … Spring AMQP stocks sample • Reference documentation – http://bit.ly/UZzvsi 34
  • 36. Content Negotiation Options • Content negotiation via file extension, Accept header, request parameter, default value, or a custom strategy throughout Spring MVC • Choose which strategies to use and in what order • Configured once in MVC Java config or MVC namespace – “.json” and “.xml” extensions automatically enabled • May configure HandlerMapping/Adapter and ExceptionResolver via ContentNegotiationManagerFactoryBean For further details see: http://bit.ly/10cCcuG 36
  • 37. Global Error Reporting • Need an application–wide strategy for writing error details to the response body? • Wishing there were a global @ExceptionHandler method? • Well, now there is! 37
  • 38. Matrix Variables • Parameters embedded in URI path segments – GET /pets/42;q=21 • Use URI variable where semi-colon content expected – /pets/{petId} • Extract via annotation – @PathVariable String petId, @MatrixVariable int q • Some configuration required to enable unless using MVC Java config and MVC namespace For further details see: http://bit.ly/WBm2ov 38
  • 40. What‟s New in the Spring TCF? • Upgraded to JUnit 4.11 and TestNG 6.5.2 • Loading WebApplicationContexts • Testing request- and session-scoped beans • Support for ApplicationContextInitializers • Loading context hierarchies (3.2.1) • And more… (see presentation from SpringOne 2GX 2012) 40
  • 41. Loading a WebApplicationContext • Q: How do you tell the TestContext Framework to load a WebApplicationContext? • A: Just annotate your test class with @WebAppConfiguration! 41
  • 42. @WebAppConfiguration • Denotes that the context should be a WebApplicationContext • Configures the resource path for the web app – Used by MockServletContext – Defaults to “src/main/webapp” – Paths are file-system folders, relative to the project root not classpath resources – The classpath: prefix is also supported 42
  • 46. ServletTestExecutionListener • Sets up default thread-local state via RequestContextHolder before each test method • Creates: – MockHttpServletRequest – MockHttpServletResponse – ServletWebRequest • Ensures that the MockHttpServletResponse and ServletWebRequest can be injected into the test instance • Cleans up thread-local state after each test method 46
  • 48. Web Scopes – Review • request: lifecycle tied to the current HttpServletRequest • session: lifecycle tied to the current HttpSession 48
  • 53. ApplicationContextInitalizer • Introduced in Spring 3.1 • Used for programmatic initialization of a ConfigurableApplicationContext • For example: – to register property sources – to activate profiles against the Environment • Configured in web.xml by specifying contextInitializerClasses via – context-param for the ContextLoaderListener – init-param for the DispatcherServlet 53
  • 54. Using Initializers in Tests • Configured in @ContextConfiguration via the initializers attribute • Inheritance can be controlled via the inheritInitializers attribute • An ApplicationContextInitializer may configure the entire context – XML resource locations or annotated classes are no longer required • Initializers are now part of the context cache key • Initializers are ordered based on Spring's Ordered interface or the @Order annotation 54
  • 56. Application Context Hierarchies • Currently only flat, non-hierarchical contexts are supported in tests. • There‟s no easy way to create contexts with parent-child relationships. • But… hierarchies are supported in production. • Wouldn‟t it be nice if you could test them, too?! 56
  • 57. Testing Context Hierarchies in 3.2.2 • New @ContextHierarchy annotation – Used in conjunction with @ContextConfiguration • @ContextConfiguration now supports a „name‟ attribute – for merging and overriding hierarchy configuration 57
  • 58. Single Test with Context Hierarchy 58
  • 59. Class and Context Hierarchies 59
  • 60. Spring MVC Test Framework 60
  • 61. What is Spring MVC Test? • First class support for testing Spring MVC applications • Fluent API • Server-side tests involve the DispatcherServlet • Client-side tests are RestTemplate based • Built on spring-test and MockHttpServletRequest/Response • Servlet container not required 61
  • 62. Q: Unit or Integration Testing? 62
  • 63. A: A Bit of Both • Integration tests for sure • However… – no Servlet container – MockHttpServletRequest/Response – Controllers can be injected with mocks • Also there are two setup options – Load WebApplicationContext as usual – Standalone setup … no Spring configuration, just controller instance! • Controller unit testing ++ 63
  • 67. Spring MVC Test – Resources • Blog post – http://bit.ly/QCKMzh • Samples – https://github.com/SpringSource/spring-mvc-showcase – http://bit.ly/VN1bPw … sample server tests – http://bit.ly/13koRQP … sample client tests • Reference documentation – http://bit.ly/SmUtD6 67
  • 69. 1st Class Support for Java 8 based apps • Language features such as lambda expressions – for callbacks with templates – for concurrent execution • think fork/join, map/reduce, etc. • APIs such as JSR-310 Date and Time – Alongside Spring‟s existing support for JodaTime 69
  • 70. Configuring Spring with Groovy 2 • Configuring and implementing Spring-style applications using Groovy 2.x • Groovy-based bean definitions • Groovy as the language of choice for an entire application, as a direct and straightforward alternative to Java source files • Groovy 2.0's static compilation support completes the picture here 70
  • 71. Support for Key Java EE 7 Technologies • JMS 2.0 • JPA 2.1 • Bean Validation 1.1 • Servlet 3.1 • And fully covering JCache 1.0 71
  • 72. Enabling WebSocket-style Architectures • Support for JSR-356 compliant runtimes • Also supporting related technologies 72
  • 73. Fine-grained Eventing and Messaging • Introducing fine-grained eventing and messaging within the application • Building on our existing application event mechanism • Aligned with our JMS message listener mechanism 73
  • 74. Pruning and Dependency Upgrades • Removing a variety of deprecated packages across the framework – See Spring Framework 3.2's deprecations! • Raising minimum dependencies to Java 6+ – Java SE 6+ and Java EE 6+ – with some compromises for EE 5++ servers 74
  • 76. Special Thanks to… • Juergen Hoeller • Chris Beams • Rossen Stoyanchev … for permitting reuse of some of their content in this presentation! 76
  • 77. Further Resources • Spring Framework – http://www.springsource.org/spring-framework – Spring Reference Manual – Javadoc • Spring Forums – http://forum.springframework.org • Spring JIRA – http://jira.springframework.org • Spring on GitHub – https://github.com/SpringSource/spring-framework 77
  • 78. Blogs • SpringSource Team Blog – http://blog.springsource.com/ • Swiftmind Team Blog – http://www.swiftmind.com/blog/ 78