application.xml文件
<bean id="configProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="locations">
<list>
<value>classpath*:resources.properties</value>
</list>
</property>
</bean>
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath*:dbconfig.properties</value>
</list>
</property>
<property name="properties" ref="configProperties" />
</bean>
service
@Value("#{configProperties['PROJECT_FILE_URL']}")
String basefileurl;
@Value("#{configProperties['PROJECT_IMAGE_URL']}")
String baseimage;