xml配置文件引入properties文件

来源:互联网 发布:淘宝个人信誉度怎么看 编辑:程序博客网 时间:2024/05/17 23:38
1、新建scmcommon.properties文件
#每30分钟
cronExpression_exectime=0 0/30 * * * ?


2、xml文件引入


<!-- 引入配置文件 -->
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<!-- <property name="location" value="classpath:jdbc.properties" /> -->
<property name="locations">
<list>
<value>classpath:jdbc.properties</value>
<value>classpath:scmcommon.properties</value>
</list>
</property>
</bean>


3、xml文件使用


${cronExpression_exectime}
原创粉丝点击