Intellij IDEA中.properties文件中文乱码问题的解决方法
问题描述
当你读取application.properties配置文件时,发现中文乱码问题,如图
此时发现properties文件下方的编码格式并不是utf-8,页面停留在properties页面出,查看右下角,如图

解决方法
检查idea的默认设置,file->setting->editor->file encodings,发现默认编码并非utf-8,如下图。
把这个默认的设置为utf-8。就可以了。

有时打开.properties文件时,中文显示为utf8编码格式,可以在file->setting->editor->file encodings下把transparent native-to-ascll conversion勾选上