1.点击file—>setting----->file Encodings------>
全部改成UTF-8的格式。
2.点击file----->other settings------->default settings-------->file Encpding
全部改成utf-8
3.在要调用的类的上面加上如下注解
@PropertySource(value = “classpath:configure.properties”, ignoreResourceNotFound = true, encoding = “UTF-8”)(超管用)
4.如果上述方法为解决问题,把配置文件中的内容复制出来,把配置文件删掉重建,应该就可以解决问题。
解决idea中springboot项目中调用配置文件中文乱码问题
最新推荐文章于 2024-07-24 17:53:59 发布