From a7fce6b0485cf7455c0a281adbcc17ed241b2592 Mon Sep 17 00:00:00 2001 From: Vedran Pavic Date: Mon, 16 Jan 2017 00:39:05 +0100 Subject: [PATCH] Document use of `OpenEntityManagerInViewInterceptor` Closes gh-7993 --- .../src/main/asciidoc/spring-boot-features.adoc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index c4c0e71e9e..f28f5d6143 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -3060,6 +3060,16 @@ Hibernate autoconfig is active because the `ddl-auto` settings are more fine-gra +[[boot-features-jpa-in-web-environment]] +==== Open EntityManager in View +If you are running a web application, Spring Boot will by default register +{spring-javadoc}/orm/jpa/support/OpenEntityManagerInViewInterceptor.html[`OpenEntityManagerInViewInterceptor`] +to apply the "Open EntityManager in View" pattern, i.e. to allow for lazy loading in web +views. If you don't want this behavior you should set `spring.jpa.open-in-view` to +`false` in your `application.properties`. + + + [[boot-features-sql-h2-console]] === Using H2's web console The http://www.h2database.com[H2 database] provides a