Top Banner
Whats new in Spring 3.0 Patrick Baumgartner
38

Whats New In Spring 3.0 ?

May 11, 2015

Download

Technology

Spring 3.0 GA is awaited in the second half of 2009. The session will show an
overview of the changes and the new features of the framework.Demos will be
shown on a sample application deployed on the new GAE/J.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Whats New In Spring 3.0 ?

Whats new in Spring 3.0

Patrick Baumgartner

Page 2: Whats New In Spring 3.0 ?

Patrick Baumgartner Trivadis AD Consultant

Focus on

Web development

OSGi / Spring dm

Agile software development

Page 3: Whats New In Spring 3.0 ?

Agenda

Page 4: Whats New In Spring 3.0 ?

Agenda Roadmap

Milestones / Feature Overview

Spring Expression Language (SpEL)

IoC / JavaConfig Integration

REST Support

Bean Validation

New Project Layout

GAE/J Demo

Page 5: Whats New In Spring 3.0 ?

Spring Portfolio

Page 6: Whats New In Spring 3.0 ?

Roadmap

Page 7: Whats New In Spring 3.0 ?

Roadmap – Past Releases Spring Framework 1.0 24.03.04

Spring Framework 2.0 05.10.05

Spring Framework 2.5 19.11.07

Page 8: Whats New In Spring 3.0 ?

Roadmap – Spring 3.0 Spring Framework 3.0 M1 08.12.09

Spring Framework 3.0 M2 01.03.09

Spring Framework 3.0 M3 Q1 2009

Spring Framework 3.0 RC 1 Q2 2009

Spring Framework 3.0 RELEASE Q2 2009

Page 9: Whats New In Spring 3.0 ?

Milestone 1 Spring EL and REST support

Updated codebase for Java 5 code style

Updated to JUnit 4.5 and JRuby 1.1

@PathVariable , @RequestParam, @RequestHeader, @CookieValue

AbstractAtomFeedView and AbstractRssFeedView

<spring:url> and <spring:param> JSP tags

Page 10: Whats New In Spring 3.0 ?

Milestone 2 Further Java 5 style API updates

Extended concurrency support

OXM module in core

RestTemplate

MVC on Portlet 2.0

Early JPA 2.0 support

Page 11: Whats New In Spring 3.0 ?

Milestone 3 Annotation-based factory methods

Declarative validation (based on JSR-303 "Bean Validation")

New XML configuration namespaces (orm, scheduling)

Spring MVC: conversation management

Preparations for JSF 2.0

Page 12: Whats New In Spring 3.0 ?

Milestone 3 Overdue since weeks

Release at SpringOne Europe 2009 Conference ?!

Jira History

Tuesday 21.04.09 - 14 Issues left

Wednesday 22.04.09 - 7 Issues left

Yesterday 24.04.09 – 8 Issues left

Today ... 9 Issues left

Page 13: Whats New In Spring 3.0 ?

Notes requires Java 5 or above

requires J2EE 1.4 or above

Some spring cleaning (removed/deprecated outdated classes)

SpringSource is building the Spring Framework on Java 6 and Java EE 5

But still compatible with Java 5 enabled J2EE 1.4 servers such as WebLogic 9 and WebSphere 6.1.

Page 14: Whats New In Spring 3.0 ?

Spring 3.0 Big Features

Page 15: Whats New In Spring 3.0 ?

Spring EL (SpEL) EL implementation included in Spring 3.0

package org.springframework.expression

next-generation expression engine inspired by Spring Web Flow 2.0's expression support

Compatible with Unified EL syntax and morepowerful

navigating bean properties, collections, maps, custom

method invocations

construction of value objects

Page 16: Whats New In Spring 3.0 ?

SpEL in Bean Definitons

Page 17: Whats New In Spring 3.0 ?

SpEL in Annotations

Page 18: Whats New In Spring 3.0 ?

SpEL Context Attributes Implicit variables

systemProperties , systemEnvironment

global platform context

Spring beans by name

similar to managed beans in JSF expressions

Page 19: Whats New In Spring 3.0 ?

IoC – Spring Java Config @Configuration

@Bean

@Primary

@Lazy

@Import

@Value

Page 20: Whats New In Spring 3.0 ?

IoC – Spring Java Config

Page 21: Whats New In Spring 3.0 ?

REST Support Spring MVC 3 provides support for REST-style

mappings

extraction of URI template parameters

content negotiation in view resolver

Goal: Native REST support within Spring MVC, for UI as well as non-UI usage

in natural MVC style

Page 22: Whats New In Spring 3.0 ?

REST Support @RequestMapping

@RequestParam

@PathVariable

@ModelAttributes

@SessionAttributes

@CookieValue

@RequestHeader

Page 23: Whats New In Spring 3.0 ?

Controller Example

Page 24: Whats New In Spring 3.0 ?

@CookieValue

Page 25: Whats New In Spring 3.0 ?

@RequestHeader

Page 26: Whats New In Spring 3.0 ?

HiddenHttpMethodFilter Allows HTML browsers to emulate PUT and DELETE

requests

HTML forms only support GET/POST natively

Special hidden parameter determines RequestMethod

Page 27: Whats New In Spring 3.0 ?

Bean Validation

In view:

Metadata can be used for persisting, rendering, etc

Spring: to be supported for MVC data binding

JSR-303 "Bean Validation" as the common ground

Page 28: Whats New In Spring 3.0 ?

New Project Layout (I) Framework modules revised

now managed in Maven style

one source tree per module jar

spring-beans.jar, spring-aop.jar, etc

no spring.jar anymore!

Page 29: Whats New In Spring 3.0 ?

New Project Layout (II) Built with new Spring build system as known from

Spring Web Flow 2.0

Ivy-based "Spring Build" system

consistent deployment procedure

consistent dependency management

consistent generation of OSGi manifests

Page 30: Whats New In Spring 3.0 ?

Modularity – OSGi Bundles

Page 31: Whats New In Spring 3.0 ?

Spring 3.0 on GAE/J

Page 32: Whats New In Spring 3.0 ?

Demo

Page 33: Whats New In Spring 3.0 ?

Summary

Page 34: Whats New In Spring 3.0 ?

Summary Modularity, shipped as OSGi Bundles

ADD – Annotation Driven Development

Spring JavaConfig integration in Core Module

RESTful Support

Spring EL (SpEL) is Unified EL ++

Bean Validation

Page 35: Whats New In Spring 3.0 ?

Questions?

Page 36: Whats New In Spring 3.0 ?

Questions?

Email: [email protected]

Twitter: @patbaumgartner

Page 37: Whats New In Spring 3.0 ?

Sources

Page 38: Whats New In Spring 3.0 ?

Sources What’s New in Spring 3 by Keith Donald,

SpringSource

http://blog.springsource.com/2008/12/05/spring-framework-30-m1-released/

http://blog.springsource.com/2009/02/25/spring-framework-30-m2-released/

http://raibledesigns.com/rd/entry/what_s_coming_in_spring