Solve the problem of Chinese garbled characters when springboot reads configuration files

Fill in the Chinese information in application.properties, and there will be a problem of Chinese garbled characters when reading the file.

For example: application.properties content:

student.name = well
 student.age = 15

Solution: I use IDEA, first File->settings->Code style->File Encoding

Just set all encodings to UTF-8.

Running it again gives normal results:

My motto: No, I can learn; I fall behind, I can catch up; I fall, I can stand up; I will do it.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325728712&siteId=291194637