<bean id="configproperties_no_reloadable_disconf" class="com.baidu.disconf.client.addons.properties.ReloadablePropertiesFactoryBean"> <property name="locations"> <list> <value>config/connects.properties</value> <value>config/zookeeper.properties</value> <value>config/other.properties</value> <!--<value>connects.properties</value>--> <!--<value>zookeeper.properties</value>--> <!--<value>other.properties</value>--> </list> </property> </bean>
或者:
<context:property-placeholder location="classpath:jdbc.properties"/>
或者:
<!-- 引入配置文件 --> <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location" value="classpath:jdbc.properties" /> </bean>