context:property-placeholde
spring配置文件中添加:
<context:property-placeholder location="classpath:jdbc.properties"/>
或者
<bean id="propertyPlaceholderConfigurer" class="org.springframework,beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>jdbc.properties<value/>
</list>
</property>
</bean>

浙公网安备 33010602011771号