すべてのImprovedNamingStrategyメソッドをオーバーライドしてブレークポイントに配置しましたが、メソッドはデバッグモードで呼び出されませんでした。Springを使ってHibernate Beanの命名戦略を定義する方法は?
私は休止状態のファクトリを1つしか持っていないので、間違いがあるので他のインスタンスは不可能です。
私は、問題はキー "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>
Thx、チェックして受け入れます。 – Arthur