HOW DO YOU CONFIGURE YOUR DATABASE DRIVER IN SPRING?

James Smith

Total Post:79

Points:395
Posted by  James Smith
Java 
 1448  View(s)
Ratings:
Rate this:
  1. James Smith

    Post:79

    Points:395
    How do you configure your database driver in spring?

    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>

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!