1、在eclipse中,如果不专门设置,properties文件的编码是ISO-8859-1,最好将其改为UTF-8

 

2、当properties文件的编码改为UTF-8还不够,Spring的context:property-placeholder标签也是用ISO-8859-1编码的方式引入properties文件的,所以需要在标签里追加一个file-encoding属性

<context:property-placeholder location="classpath:copywriting.properties"
        file-encoding="utf-8" ignore-unresolvable="true" />

 

相关文章:

  • 2021-05-01
  • 2022-12-23
  • 2022-03-08
  • 2021-12-08
  • 2021-10-29
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-16
  • 2021-07-03
  • 2021-03-30
  • 2021-10-04
  • 2022-12-23
  • 2021-07-10
  • 2021-08-21
相关资源
相似解决方案