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;

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