使用springboot jpa,在运行项目时发现一个WARN

WARN 11472 --- [ main] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning

如何去掉呢?

在src/main/resources/application.properties 加上open-in-view: false

去掉WARN spring.jpa.open-in-view is enabled by default

重新启动,WARN消失

相关文章: