问题描述:
SpringBoot项目引入Jpa依赖后项目出现警告:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>2.0.6.RELEASE</version>
</dependency>
WARN: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.
解决办法:
在SpringBoot的配置文件中加入以下配置(加入后并不会对项目产生不好的影响):
spring.jpa.open-in-view=false