Lo nuevo en Spring 3.0 - Spring Live Perú 2009

Post on 24-Jun-2015

1.876 views 2 download

description

Presentación para Spring Live Perú 2009, Universidad Nacional Mayor de San Marcos, 16 de mayo 2009

Transcript of Lo nuevo en Spring 3.0 - Spring Live Perú 2009

Lo nuevo en Spring 3.0

Spring Live Perú 2009UNMSM – Lima, 2009Ing. Lennon Shimokawahttp://lshimokawa.net

Conferencias

Spring Perú

http://www.springperu.org/ http://groups.google.com/group/spr

ing-user-group-peru Spring Community Day 2009

Spring 3.0 M3

Reorganización Un directorio de

fuentes y jar por modulo

Ya no existe el spring.jar

Basado en Apache Ivy

Java 5 support

Generics and varargs BeanFactory generics

T getBean(String name, Class<T> requiredType)

TaskExecutor interface extends java.util.concurrent.Executor

Test Context Framework @RunWith(SpringJUnit4ClassRunner.cla

ss) @ContextConfiguration @Test

Spring Expression Language

XML <property name="systemProperties"

value="#{systemProperties}" />

Annotation @Value(value = "#{systemProperties}") private Map<String, String> systemProperties;

JavaConfig support@Configurationpublic class JavaConfigContext {

@Bean public FooService fooService() { FooServiceImpl fooService = new

FooServiceImpl(); return fooService; }}

REST support

REST

Representational State Transfer Utiliza los métodos HTTP de manera

explícita (POST, GET, PUT, DELETE) No mantiene estado Expone URIs con forma de directorios Transfiere XML, JavaScript Object

Notation (JSON), o ambos

REST Annotations

@RequestMapping(value = "/clientes/get/{idCliente}", method = RequestMethod.GET)

public ModelAndView get(@PathVariable("idCliente") String idCliente, Model model)

REST Spring MVC Views MarshallingView AbstractAtomFeedVi

ew AbstractRssFeedVie

w

Platform support Requires Java 5 or above

Java 6 automatically detected & supported

Web container: Servlet 2.4 or above e.g. Tomcat 5.5 & 6.0

Java EE level: J2EE 1.4 or above e.g. WebSphere 6.1 & 7.0

Fully OSGi compatible out of the box featured in dm Server 2.0

Otras mejoras

JSR 303: Bean Validation Portlet 2.0 support

Preguntas

Contacto http://lshimokawa.net http://twitter.com/lshimokawa