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

使用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消失

posted @ 2019-08-20 11:39  慕尘  阅读(4863)  评论(0编辑  收藏  举报