Mysql——Springboot插入mysql中的中文数据变成??

Mysql——Springboot插入mysql中的中文数据变成??:

网上有很多解决方案,但是我的解决方案就是

jdbc:mysql://localhost:3306/SpringBootSystem?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false

需要把amp;去掉后:

 jdbc:mysql://localhost:3306/SpringBootSystem?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false

后数据插入正常!

注:你在 xml 配置文件中配置应当写上amp;,但是当你在yml文件中配置的时候,就应该去掉amp;

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章