|
@@ -1,58 +1,18 @@
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
-<beans xmlns="http://www.springframework.org/schema/beans"
|
|
|
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
|
|
- <bean id="bookDao" class="org.starter.learning.dao.impl.BookDaoImpl"/>
|
|
|
- <bean id="bookService" class="org.starter.learning.service.impl.BookServiceImpl" />
|
|
|
- <bean id="bookDao2" class="org.starter.learning.dao.impl.BookDaoImpl" />
|
|
|
- <bean id="testBase" class="org.starter.learning.test.TestBaseImpl" >
|
|
|
- <property name="array">
|
|
|
- <array>
|
|
|
- <value>100</value>
|
|
|
- <value>200</value>
|
|
|
- <value>300</value>
|
|
|
- </array>
|
|
|
- </property>
|
|
|
- <property name="list">
|
|
|
- <list>
|
|
|
- <value>string1</value>
|
|
|
- <value>string2</value>
|
|
|
- <value>string3</value>
|
|
|
- </list>
|
|
|
- </property>
|
|
|
- <property name="set">
|
|
|
- <set>
|
|
|
- <value>value1</value>
|
|
|
- <value>value2</value>
|
|
|
- <value>value2</value>
|
|
|
- <value>value3</value>
|
|
|
- </set>
|
|
|
- </property>
|
|
|
- <property name="map">
|
|
|
- <map>
|
|
|
- <entry key="country" value="China" />
|
|
|
- <entry key="province" value="Shanxi" />
|
|
|
- <entry key="city" value="Datong" />
|
|
|
- </map>
|
|
|
- </property>
|
|
|
- <property name="properties">
|
|
|
- <props>
|
|
|
- <prop key="country" >China</prop>
|
|
|
- <prop key="province">ShanXi</prop>
|
|
|
- <prop key="city">Datong</prop>
|
|
|
- </props>
|
|
|
- </property>
|
|
|
+ <beans xmlns="http://www.springframework.org/schema/beans"
|
|
|
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
+ xmlns:context="http://www.springframework.org/schema/context"
|
|
|
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd ">
|
|
|
+ <context:property-placeholder location="jdbc.properties" system-properties-mode="NEVER" />
|
|
|
+<!-- <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource">-->
|
|
|
+<!-- <property name="driverClassName" value="${jdbc.driver}" />-->
|
|
|
+<!-- <property name="url" value="${jdbc.url}" />-->
|
|
|
+<!-- <property name="username" value="${jdbc.username}" />-->
|
|
|
+<!-- <property name="password" value="${jdbc.password}" />-->
|
|
|
+<!-- </bean>-->
|
|
|
+ <bean id="testBase" class="org.starter.learning.test.TestBaseImpl2">
|
|
|
+ <property name="username" value="${username}" />
|
|
|
+ <property name="password" value="${jdbc.password}" />
|
|
|
</bean>
|
|
|
- <bean id="dataSourceDeprecated" class="com.alibaba.druid.pool.DruidDataSource">
|
|
|
- <property name="driverClassName" value="com.mysql.cj.jdbc.Driver" />
|
|
|
- <property name="url" value="jdbc:mysql://localhost:3306/testdb" />
|
|
|
- <property name="username" value="root" />
|
|
|
- <property name="password" value="123456" />
|
|
|
- </bean>
|
|
|
- <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
|
|
|
- <property name="driverClass" value="com.mysql.cj.jdbc.Driver" />
|
|
|
- <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/testdb" />
|
|
|
- <property name="user" value="root" />
|
|
|
- <property name="password" value="123456" />
|
|
|
- </bean>
|
|
|
-</beans>
|
|
|
+
|
|
|
+ </beans>
|