web.xml
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/configuration/spring/applicationContext*.xml,
</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
applicationContext*.xml添加
[color=red]<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>/WEB-INF/configuration/spring/*.properties</value>
</list>
</property>
</bean>[/color]
在需要使用properties属性值的地方引用[color=red]${properties文件键值}[/color]
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/configuration/spring/applicationContext*.xml,
</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
applicationContext*.xml添加
[color=red]<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>/WEB-INF/configuration/spring/*.properties</value>
</list>
</property>
</bean>[/color]
在需要使用properties属性值的地方引用[color=red]${properties文件键值}[/color]