Internationalization is a way to design and manufacture products that are easily adapted to different regional requirements. It requires the extraction of all regional language, country and culture-related elements from the product. In other words, the functionality and code design of the application considers the need to run in different regions, and its code simplifies the production of different local versions. The process of developing such a program is called internationalization.
When springboot uses i18n for international file configuration, fill in the Chinese information in the file named messages_zh_CN.properties. When accessing using a browser, Chinese garbled code appears. At this time, modify the setting configuration in idea:
Note:
After modifying the configuration, the Chinese text of the properties configuration file is already garbled. If the garbled Chinese text of the file is not changed back, the garbled code will still be garbled when accessing it with a browser (this is how I was cheated. I changed the configuration and did not check the configuration file again...)
Summarize
The above is the solution to the problem of garbled Chinese code in properties files when using i18n in spring boot. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to everyone in time. Thank you very much for your support to Wulin.com website!