只要是乱码,很明显需要指定编码格式,为utf-8

 

<!-- 注解使用properties -->
    <bean 
          class="org.springframework.beans.factory.config.PropertiesFactoryBean">
        <property name="locations">
            <list>
                <value>classpath:/*.properties</value>
            </list>
        </property>
        <property name="fileEncoding">
            <value>utf-8</value>
        </property>
    </bean>

 

然后再获取配置就不会出现乱码了。

相关文章:

  • 2021-11-14
  • 2021-08-28
  • 2022-12-23
  • 2021-08-11
  • 2021-09-15
  • 2022-01-05
  • 2021-08-13
猜你喜欢
  • 2022-12-23
  • 2021-12-24
  • 2021-12-30
  • 2022-12-23
  • 2021-07-28
  • 2021-07-18
  • 2021-08-06
相关资源
相似解决方案