1. mysql数据库编码问题
目前只能通过重新建库解决,建库的时候,选择UTF-8字符集。
2. 连接mysql数据库的url编码设置问题。
为mysql数据库的连接字符串设置编码方式,如下:
jdbc:mysql://localhost:3306/demo?useUnicode=true&characterEncoding=utf8
添加了:
?useUnicode=true&characterEncoding=utf8
目前只能通过重新建库解决,建库的时候,选择UTF-8字符集。
为mysql数据库的连接字符串设置编码方式,如下:
jdbc:mysql://localhost:3306/demo?useUnicode=true&characterEncoding=utf8
添加了:
?useUnicode=true&characterEncoding=utf8