【发布时间】:2015-01-03 14:45:20
【问题描述】:
我正在尝试使用 spring petclinic 应用程序,其完整代码为 at this link。我想设置hibernate.max_fetch_depth=0,但是当我重新启动tomcat服务器并从eclipse重新启动应用程序时,我似乎无法让这个设置生效。
这里是a link to the directory that contains all the config files。 我应该将hibernate.max_fetch_depth=0 设置放在哪个配置文件中,我应该使用什么确切的语法?
我试着把它放在business-config.xml:
<property name="jpaProperties">
<props>
<prop key="hibernate.hbm2ddl.auto">create-drop</prop>
<prop key="hibernate.max_fetch_depth">0</prop>
</props>
</property>
我也试过把它放在data-access.properties:
hibernate.max_fetch_depth=0
但这两种方法似乎都行不通。
【问题讨论】:
标签: java spring hibernate spring-mvc jpa