若执行hql中查询条件含有汉字,那么就查询不出来,到了hibernate内部出现乱码
在spring配置文件中加上如此即可解决!
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.Oracle9Dialect
</prop>
<prop key="hibernate.jdbc.use_streams_for_binary">
true
</prop>
<prop key="hibernate.jdbc.batch_size">0</prop>
<prop key="hibernate.query.factory_class">
org.hibernate.hql.classic.ClassicQueryTranslatorFactory
</prop>
</props>
</property>