|
@@ -14,12 +14,22 @@
|
|
|
http://www.springframework.org/schema/aop
|
|
|
http://www.springframework.org/schema/aop/spring-aop-4.3.xsd" >
|
|
|
|
|
|
+ <!-- 加载配置文件 -->
|
|
|
+ <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
|
|
+ <property name="locations">
|
|
|
+ <list>
|
|
|
+ <value>classpath:jdbc.properties</value>
|
|
|
+ <value>classpath:basicInfo.properties</value>
|
|
|
+ </list>
|
|
|
+ </property>
|
|
|
+ </bean>
|
|
|
+
|
|
|
<!-- 数据源的配置 -->
|
|
|
<bean id = "dataSource" class="org.apache.commons.dbcp.BasicDataSource">
|
|
|
- <property name="driverClassName" value = "com.mysql.jdbc.Driver"></property>
|
|
|
- <property name="url" value = "jdbc:mysql://118.178.58.178:3306/sq_logistics?useUnicode=true&characterEncoding=UTF-8"></property>
|
|
|
- <property name="username" value = "root"></property>
|
|
|
- <property name="password" value = "sql345678"></property>
|
|
|
+ <property name="driverClassName" value = "${jdbc.driver}"></property>
|
|
|
+ <property name="url" value = "${jdbc.url}"></property>
|
|
|
+ <property name="username" value = "${jdbc.username}"></property>
|
|
|
+ <property name="password" value = "${jdbc.password}"></property>
|
|
|
</bean>
|
|
|
|
|
|
<!-- session工厂 -->
|