引入SpringBoot Jpa依赖后,项目出现警告

问题描述:

  SpringBoot项目引入Jpa依赖后项目出现警告:


    org.springframework.boot
    spring-boot-starter-data-jpa
    2.0.6.RELEASE

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

 

你可能感兴趣的:(Spring,Boot)