我想在表格中添加一些俄文文本。它工作正常,如果我会使用MySQL,而不是休眠。 这使我的文字看起来????
:休眠和西里尔文
public void addHeadHunter(String city, Integer salary) {
Session session = null;
session = this.sessionFactory.getCurrentSession();
Query query = session
.createSQLQuery(
"INSERT INTO headhunter VALUES(NULL,:city,:salary,NULL)")
.setString("city", city).setInteger("salary", salary);
int updated = query.executeUpdate();
}
什么是错的,同志们?
大多数情况下,它应该与您的字符编码问题。既然你测试你尝试插入没有给出。没有其他猜测。 –