Package org.joinfaces.autoconfigure.jpa
Class JpaWebAutoConfiguration
- java.lang.Object
-
- org.joinfaces.autoconfigure.jpa.JpaWebAutoConfiguration
-
@Configuration @ConditionalOnWebApplication(type=SERVLET) @ConditionalOnClass(name={"javax.persistence.EntityManager","org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter"}) @ConditionalOnProperty(prefix="spring.jpa", name="open-in-view", havingValue="true", matchIfMissing=true) @AutoConfigureBefore(org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration.class) public class JpaWebAutoConfiguration extends java.lang.Object
Spring Boot will by default register aOpenEntityManagerInViewInterceptor
to apply the "Open EntityManager in View" pattern, i.e. to allow for lazy loading in web views.Unfortunately the Interceptor doesn't work for JSF, so this AutoConfiguration registers a
OpenEntityManagerInViewFilter
instead.- See Also:
JpaBaseConfiguration
-
-
Constructor Summary
Constructors Constructor Description JpaWebAutoConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OpenEntityManagerInViewFilter
openEntityManagerInViewFilter()
-
-
-
Method Detail
-
openEntityManagerInViewFilter
@Bean @ConditionalOnMissingBean public OpenEntityManagerInViewFilter openEntityManagerInViewFilter()
-
-