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
在配置文件application.properties里添加
spring.jpa.open-in-view=false
或者application.yml里添加
spring
jpa:
open-in-view: false
文件名不一样,但属于一种。