spring配置中引入配置文件

1、配置

<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
	<property name="locations">
		<list>
			<value>classpath:resource/appConfig.properties</value>
		</list>
	</property>
	<property name="systemPropertiesModeName">
		<value>SYSTEM_PROPERTIES_MODE_OVERRIDE</value>
	</property>
</bean>

2、使用

${development.mode}
 

猜你喜欢

转载自crazysky.iteye.com/blog/1059845