How to use a path relative to project root to H2 db-file configuration with Play Framework 2.4?

后端 未结 2 803
无人共我
无人共我 2020-12-24 01:35

We\'re developing a Play 2.4 application (Java API).

For dev purposes, we\'d like to use a persistent H2 database with DB file path relative to the project root dire

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-24 02:00

    A fixed or relative path can be used. When using the URL jdbc:h2:file:./data/sample http://www.h2database.com/html/faq.html

    now a relative path can be used.

    for example, jdbc:h2:file:./../../h2db;

提交回复
热议问题