Announcement Announcement Module
Collapse
No announcement yet.
how to convert a H2 database URL into an app-context.xml? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to convert a H2 database URL into an app-context.xml?

    I am working on learning both Java and Spring MVC 3. I have learned how to use the H2 database as an embedded database:

    HTML Code:
    <jdbc:embedded-database id="dataSource" type="H2">
        <jdbc:script location="classpath:schema.sql"/>
        <jdbc:script location="classpath:test-data.sql"/>    
    </jdbc:embedded-database>
    But now I would like to connect to a H2 database via a local H2 server. The server is localhost, on port 8084 and the database is found C:\Data\FirstH2Database.h2. So if I am not mistaken, the Database URL would be:

    jdbc:h2:tcp://localhost:8084/C:\Data\FirstH2Database.h2

    How do I put that into my app-context.xml?
Working...
X