インテリジェントjspringfootエラーセット

829 ワード

Spring Bootサーバを実行すると、次のエラーが発生します。

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
解釈:spring.jpa.デフォルトではopen-in-viewがアクティブです.したがって、ビューレンダリング中にデータベースクエリーを実行できます.この警告を無効にするにはspringを明示的に使用します.jpa.Open-in-viewを構成します.
注意:https://stackoverflow.com/questions/30549489/what-is-this-spring-jpa-open-in-view-true-property-in-spring-boot

ソリューション

  • application.propertiesファイルで次の内容を宣言すればいいです.
  • spring.jpa.open-in-view=false