//1,在spring的配置文件中,注入properties文件
spring-config.xml
<bean id="configProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="locations">
<list>
<value>classpath:resource/system.properties</value>
</list>
</property>
</bean>
//2,可以直接通过注解获取system.properties文件中key=HTTP_IMG_PATH的value值
@Value("#{configProperties['HTTP_IMG_PATH']}") //spring注入Bean(configProperties),直接获取value
private String httpImgPath;