IDEA2020.3
已知项目的默认编码方式为UTF-8,而yml的默认编码方式为GBK。
在yml中配置com.hyh.name值为天乔巴夏。
com.hyh.name
天乔巴夏
通过@Value("${com.hyh.name}")读取,产生中文乱码的问题。
@Value("${com.hyh.name}")
File -> Settings -> Editor -> File Encodings
IDEA解决yml配置文件中文输出乱码问题
原文:https://www.cnblogs.com/summerday152/p/13947925.html