執行帶有日語值的插入查詢時,將在MySQL工作臺中正常工作。 但是,當我從我的import.sql嘗試它時,這些字符看起來像是「????」在數據庫中。針對日文數據的Hibernate import.sql
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</prop>
<prop key="hibernate.hbm2ddl.auto">create</prop>
<prop key="hibernate.connection.characterEncoding">UTF-8</prop>
<prop key="hibernate.connection.useUnicode">true</prop>
<prop key="hibernate.connection.CharSet">UTF-8</prop>
<prop key="hibernate.hbm2ddl.import_files">/import.sql</prop>
</props>
</property>