applicationContext-resources.xml
3.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
<!-- For mail settings and future properties files -->
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="ignoreUnresolvablePlaceholders" value="true"/>
<property name="locations">
<list>
<value>classpath:jdbc.properties</value>
<value>classpath:mail.properties</value>
<value>classpath:hibernate.properties</value>
</list>
</property>
<property name="systemPropertiesMode">
<util:constant static-field="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.SYSTEM_PROPERTIES_MODE_OVERRIDE"/>
</property>
</bean>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="${jdbc.driverClassName}"/>
<property name="url" value="${jdbc.url}"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
<property name="maxActive" value="100"/>
<property name="maxWait" value="1000"/>
<property name="poolPreparedStatements" value="true"/>
<property name="defaultAutoCommit" value="true"/>
<property name="validationQuery" value="${jdbc.validationQuery}"/>
<property name="testOnBorrow" value="true"/>
</bean>
<bean id="msDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
<!--property name="url" value="jdbc:sqlserver://10.54.152.13:1433;DatabaseName=SMTMat"/-->
<property name="url" value="jdbc:sqlserver://10.179.244.55\SQLEXPRESS;DatabaseName=PDA_DB"/>
<property name="username" value="ecall"/>
<property name="password" value="ecall"/>
<property name="maxActive" value="20"/>
<property name="maxWait" value="1000"/>
<property name="poolPreparedStatements" value="true"/>
<property name="defaultAutoCommit" value="true"/>
<property name="validationQuery" value="SELECT 1 + 1"/>
<property name="testOnBorrow" value="true"/>
</bean>
<!-- 下面定义了DbUtils的一个模板操作Bean -->
<bean id="dbUtilsTemplate" class="com.myproject.dao.czshelf.DbUtilsTemplate">
<property name="msDataSource" ref="msDataSource" />
</bean>
<bean id="oracleDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<property name="url" value="jdbc:oracle:thin:@10.8.214.128:1521/AEODS"/>
<property name="username" value="smtrd"/>
<property name="password" value="smtrd"/>
<property name="maxActive" value="2"/>
<property name="maxWait" value="1000"/>
<property name="poolPreparedStatements" value="true"/>
<property name="defaultAutoCommit" value="true"/>
<property name="validationQuery" value="select 1 from dual"/>
<property name="testOnBorrow" value="true"/>
</bean>
<!-- 下面定义了DbUtils的一个模板操作Bean -->
<bean id="oracleDbUtilsTemplate" class="com.myproject.dao.czshelf.DbUtilsTemplate">
<property name="msDataSource" ref="oracleDataSource" />
</bean>
<!--
<import resource="mongo.xml"/>
-->
</beans>