【发布时间】:2016-03-24 15:34:56
【问题描述】:
我重写了所有 ImprovementNamingStrategy 方法并为它们放置了断点,但在调试模式下没有调用方法。
我只有一个休眠工厂,所以不可能因为其他实例而出错。
我认为,问题出在关键“hibernate.ejb.naming_strategy”还是没有?
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.springframework.org/schema/beans"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd">
<bean id="sqlSessionFactory" class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.${jdbc.dialect}</prop>
<prop key="hibernate.globally_quoted_identifiers=true">true</prop>
<prop key="hibernate.enable_lazy_load_no_trans">false</prop>
<prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>
<prop key="hibernate.show_sql">{hibernate.show_sql}</prop>
<prop key="hibernate.ejb.naming_strategy">
com.stub.utilities.dao.sql.hibernate.LowerCaseNamingStrategy
</prop>
</props>
</property>
<property name="annotatedClasses"/>
</bean>
</beans>
波姆
<spring.version>4.2.4.RELEASE</spring.version>
<hibernate.core.version>5.0.7.Final</hibernate.core.version>
【问题讨论】:
标签: java database spring hibernate orm