參考: 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>