1、修改my.ini,修改default-character-set=utf8
2、修改hibernate.cfg.xml中的connection.url属性。应该为:
- <property name="connection.url">
- jdbc:mysql://localhost:3306/hibernate?useUnicode=true&characterEncoding=UTF-8
- </property>
1、修改my.ini,修改default-character-set=utf8
2、修改hibernate.cfg.xml中的connection.url属性。应该为: