相关文章:http://www.zslin.com/web/article/detail/47

                 https://blog.csdn.net/w1014074794/article/details/71159722


我在 application.properties 中包含有中文的属性值,在程序中读取该属性的值,显示在网页上是乱码。根据网上的资料,我通过如下的设置解决了这个问题:

    1. 在 application.properties 文件中增加以下内容:

        SpringBoot读取配置文件中文属性值而在网页显示位乱码的处理办法(非原创)

    2. 将 application.properties 文件的编码格式设置为 UTF-8

    3. (在IntelliJ IDEA中)设置 File Encodings 的 Transparent native-to-ascii conversion 为 true,具体操作如下:

            依次点击 File -> Settings -> Editor -> File Encodings,Properties Files (*.properties)下的Default encoding for         properties files设置为UTF-8,将Transparent native-to-ascii conversion前的勾选上。SpringBoot读取配置文件中文属性值而在网页显示位乱码的处理办法(非原创)


相关文章:

  • 2021-06-18
  • 2022-12-23
  • 2021-08-25
  • 2022-12-23
  • 2021-11-23
  • 2021-11-05
  • 2021-04-20
  • 2022-12-23
猜你喜欢
  • 2021-05-08
  • 2022-02-18
  • 2022-01-14
  • 2021-11-15
  • 2022-12-23
  • 2022-02-20
  • 2022-01-13
相关资源
相似解决方案