diff --git a/spring-framework-reference/src/new-in-3.1.xml b/spring-framework-reference/src/new-in-3.1.xml index 4e836dc21528..c5b63337fc15 100644 --- a/spring-framework-reference/src/new-in-3.1.xml +++ b/spring-framework-reference/src/new-in-3.1.xml @@ -181,6 +181,20 @@ +
+ JPA EntityManagerFactory bootstrapping without persistence.xml + In standard JPA, persistence units get defined through META-INF/persistence.xml + files in specific jar files which will in turn get searched for @Entity classes. + In many cases, persistence.xml does not contain more than a unit name and relies on defaults and/or + external setup for all other concerns (such as the DataSource to use, etc). For that reason, Spring 3.1 + provides an alternative: LocalContainerEntityManagerFactoryBean accepts a + 'packagesToScan' property, specifying base packages to scan for @Entity classes. + This is analogous to AnnotationSessionFactoryBean's property of the same name + for native Hibernate setup, and also to Spring's component-scan feature for regular Spring beans. + Effectively, this allows for XML-free JPA setup at the mere expense of specifying a base package for + entity scanning: a particularly fine match for Spring applications which rely on component scanning + for Spring beans as well, possibly even bootstrapped using a code-based Servlet 3.0 initializer. +
New HandlerMethod-based Support Classes For Annotated Controller Processing Spring 3.1 introduces a new set of support classes for processing requests