Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle data-source configuration for Spring

In the Spring framework, how is an Oracle data-source configured?

like image 999
mauryat Avatar asked Nov 14 '12 21:11

mauryat


1 Answers

In the context.xml file:

<bean id="dataSource" class="oracle.jdbc.pool.OracleDataSource">
    <property name="dataSourceName" value="ds"/>
    <property name="URL" value="jdbc:oracle:thin:@<hostname>:<port_num>:<SID>"/>
    <property name="user" value="dummy_user"/>
    <property name="password" value="dummy_pwd"/>
</bean>

Example of URL: jdbc:oracle:thin:@abc.def.ghi.com:1234:TEAM4

like image 119
mauryat Avatar answered Oct 14 '22 19:10

mauryat