相关设置:
1、idea编码格式设置:
2、MySQL的相关编码格式设置:
修改前编码:
无用操作:之前通过命令行修改编码格式:
set character_set_client = utf8;
set character_set_server = utf8;
set character_set_connection = utf8;
set character_set_database = utf8;
set character_set_results = utf8;
set collation_connection = utf8_general_ci;
set collation_database = utf8_general_ci;
set collation_server = utf8_general_ci;
发现再次进入查看编码格式依然没有被修改
解决方法:
1)在注册表中找到 my.ini路径
winds+R:输入regedit
右键ImagePath,可见my.ini文件的具体位置,然后到相应路径下找到my.ini文件
2)修改my.ini文件
(在[mysqlid]下面添加character set server=utf8)
3)重启mysql服务即可。
修改后编码:
标签:编码,set,springMvc,utf8,character,idea,乱码,ini,my From: https://www.cnblogs.com/mengxiangtiankongfenwailan/p/16860482.html