只要是亂碼,很明顯需要指定編碼格式,為utf-8
<!-- 注解使用properties -->
<bean id="configProperties"
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>
然后再獲取配置就不會出現亂碼了。
