29.3.4 Open EntityManager in View

如果正在运行的是Web应用,Spring Boot会默认注册OpenEntityManagerInViewInterceptor以应用“Open EntityManager in View”模式,即允许在视图层进行延迟加载。如果不想如此,则须在application.properties中将spring.jpa.open-in-view设为false


书籍推荐