1.配置
在applicationContext.xml 中配置
<bean id="themisFrontCommon" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<!-- 解决中文乱码问题 -->
<property name="fileEncoding" value="utf-8"/>
<property name="locations">
<list>
<value>classpath:/config/test.properties</value>
<value>classpath:/config/ThemisFrontCommon.properties</value>
</list>
</property>
</bean>
2.使用
@Value("#{themisFrontCommon['test.name']}")
private String WebFileHtml;
@Value("#{themisFrontCommon['signName']}")
private String signName;
@Value("#{themisFrontCommon['test']}")
private String test;