解決springboot讀取配置文件的中文亂碼問題

在application.properties中填寫中文信息,在讀取該文件時會出現中文亂碼問題。 比如:application.properties內容: student.name=小康 student.age=15 解決方法:我用的是IDEA,首先File->settings->Code style->File Encoding 把所有的編碼都設爲UTF-8就好了。 再次運行,得出正常結果: 我
相關文章
相關標籤/搜索