Spring中配置JNDI資料來源
阿新 • • 發佈:2019-02-17
server.xml下 <GlobalNamingResources></GlobalNamingResources>中的配置
<Resource
auth="Container"
description="DB Connection"
driverClass="oracle.jdbc.driver.OracleDriver"
maxPoolSize="50"
minPoolSize="2"
initialPoolSize="5"
maxIdleTime="60"
autoCommitOnClose="true"
acquireIncrement="3"
name="jdbc/DBPool"
user="root"
password="123456"
jdbcUrl="jdbc:oracle:thin:@192.168.120.165:1521:orcl10"
factory="org.apache.naming.factory.BeanFactory"
type="com.mchange.v2.c3p0.ComboPooledDataSource"
/>
<Resource
auth="Container"
description="DB Connection"
driverClass="oracle.jdbc.driver.OracleDriver"
maxPoolSize="50"
minPoolSize="2"
initialPoolSize="5"
maxIdleTime="60"
autoCommitOnClose="true"
acquireIncrement="3"
name="jdbc/DBPool"
user="root"
password="123456"
jdbcUrl="jdbc:oracle:thin:@192.168.120.165:1521:orcl10"
factory="org.apache.naming.factory.BeanFactory"
type="com.mchange.v2.c3p0.ComboPooledDataSource"
/>