在applicationContext.xml中设置读取jdbc.properties文件

参考: https://blog.csdn.net/wu631464569/article/details/51898871
一、jdbc.properties的主要内容主要是数据库连接和配置的一些基本信息,如下图:

二、 在applicationContext.xml中怎么读取jdbc.properties的配置信息,如下图:

参考代码:

<!-- 引入jdbc配置文件 -->
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
	<property name="locations">
		<list>
			<value>classpath*:conf/jdbc.properties</value>
		</list>
	</property>
</bean>
原文地址:https://www.cnblogs.com/xm970829/p/12981466.html