【问题标题】:Limit depth in spring data jpa with hibernate and spring boot yaml configuration使用hibernate和spring boot yaml配置限制spring data jpa的深度
【发布时间】:2017-03-28 19:13:06
【问题描述】:

我的网站是用 spring boot、springMVC、spring data JPA 和 hibernate 构建的。我知道 hibernate 有一个名为 max_fetch_depth 的配置。但是我不知道如何在spring boot项目中用yaml格式配置它。我把它放在 application.yml 中,如下所示:

spring:
  properties:
    hibernate.max-fetch-depth: 1

好像不行。 有什么想法吗? 谢谢!

【问题讨论】:

    标签: hibernate spring-boot yaml spring-data-jpa


    【解决方案1】:
    spring:
      jpa:
        properties:
           hibernate.max_fetch_depth: 1 
    

    【讨论】:

      猜你喜欢
      • 2018-06-02
      • 2020-03-16
      • 2017-07-09
      • 1970-01-01
      • 2015-11-28
      • 2019-07-20
      • 2019-01-22
      • 2017-11-29
      • 2016-06-22
      相关资源
      最近更新 更多