Home > DeveloperSection > Interviews > How do you configure your database driver in spring?

Posted on    July-23-2011 8:01 AM

 Java Java 
Ratings:
 1 Answer(s)
  1215  View(s)
Rate this:

James Smith

Total Post:79

Points:395
Posted on    July-23-2011 12:00 AM

Using datasource "org.springframework.jdbc.datasource.DriverManagerDataSource".

Example:

<bean id="ds" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>org.hsqldb.jdbcDriver</value>
</property>
<property name="url">
<value>jdbc:hsqldb:db/appfuse</value>
</property>
<property name="username"><value>abc</value></property>
<property name="password"><value>xyz</value></property>
</bean>

Don't want to miss updates? Please click the below button!

Follow MindStick