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;
。