关于spring hibernate连接oracle数据库的配置

jdbc.properties文件配置如下
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc\:oracle\:thin\:@localhost\:1521\:
database=OA
username=oa
password=oa
initialSize=2
maxActive=10
maxIdle=2
minIdle=2
removeAbandoned=true
removeAbandonedTimeout=25200
maxWait=30000
validationQuery = select 1 from dual
testOnBorrow=true
bean.xml文件配置如下
    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
	    <property name="driverClassName" value="${driverClassName}"/>
	    <property name="url" value="${url}${database}"/>
	    <property name="username" value="${username}"/>
	    <property name="password" value="${password}"/>
	    <property name="initialSize" value="${initialSize}"/>
	    <property name="maxActive" value="${maxActive}"/>
	    <property name="maxIdle" value="${maxIdle}"/>
	    <property name="minIdle" value="${minIdle}"/>
  	</bean>	

你可能感兴趣的:(关于spring hibernate连接oracle数据库的配置)