Detailed description of the configuration of Spring Hibernate connecting to the oracle database, hibernateoracle
Detailed description of Spring Hibernate connection to oracle Database Configuration
The configuration of the jdbc. properties file is as follows:
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
The bean. xml file configuration is as follows:
<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>
Thank you for reading this article. I hope it will help you. Thank you for your support for this site!