去掉WARN spring.jpa.open-in-view is enabled by default
Posted baby123
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了去掉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消失
以上是关于去掉WARN spring.jpa.open-in-view is enabled by default的主要内容,如果未能解决你的问题,请参考以下文章
[Vue warn]: Error in render: "TypeError: Cannot read property '0' of undefined
解决_default_ VirtualHost overlap on port 80
Java 记录异常,使用 getMessage 或 toString : log.warn(ex.getMessage()) 或 log.warn(ex) 使用开源