<!-- 配置数据库连接bean -->
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName"><value>oracle.jdbc.driver.OracleDriver</value></property>
<property name="url"><value>jdbc:oracle:thin:@192.168.0..112:1521:enesysdb</value></property>
<property name="username"><value>enesys0922</value></property>
<property name="password"><value>enesys0922</value></property>
</bean>
<!-- sql server -->
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" abstract="false" singleton="true" lazy-init="default" autowire="default" dependency-check="default">
<property name="driverClassName"><value>net.sourceforge.jtds.jdbc.Driver</value></property>
<property name="url"><value>jdbc:jtds:sqlserver://192.168.10.210:1433;databaseName=xiamengas;selectMethod=cursor</value></property>
<property name="username"><value>sa</value></property>
<property name="password"><value>sa</value></property>
</bean>
<!-- 配置连接池bean -->
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName">
<value>java:comp/env/jdbc/dbpool</value>
</property>
</bean>
<Context path="" docBase="D:/tzWater/WebContent" debug="0">
<Resource name="jdbc/dbpool" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver"
maxIdle="10" maxWait="10000"
username="sa" password="sa" url="jdbc:oracle:thin:@192.168.0.112:1521:enesysdb"
maxActive="40"/>
</Context>