insert或update时中文出现乱码的解决方法:
在连接串后面加上数据库编码。
<property name="connection.url">
jdbc:mysql://localhost:3306/mysql ?useUnicode=true&characterEncoding=utf-8
</property>
在连接串后面加上数据库编码。
<property name="connection.url">
jdbc:mysql://localhost:3306/mysql ?useUnicode=true&characterEncoding=utf-8
</property>