当前位置:网站首页>IDEA解决yml配置文件中文输出乱码问题

IDEA解决yml配置文件中文输出乱码问题

2020-11-09 12:49:00 天乔巴夏丶

开发工具

IDEA2020.3

异常情况如下

已知项目的默认编码方式为UTF-8,而yml的默认编码方式为GBK。

在yml中配置com.hyh.name值为天乔巴夏

通过@Value("${com.hyh.name}")读取,产生中文乱码的问题。

问题解决

File -> Settings -> Editor -> File Encodings

版权声明
本文为[天乔巴夏丶]所创,转载请带上原文链接,感谢
https://www.cnblogs.com/summerday152/p/13947925.html