SoFunction
Updated on 2025-03-09

Detailed explanation of the configuration of Spring Hibernate connecting to oracle database

Detailed explanation of the configuration of Spring Hibernate connecting to oracle database

The file configuration is as follows

driverClassName= 
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 file configuration is as follows

<bean  class="" 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, I hope it can help you. Thank you for your support for this site!