How to configure FS database in playframework 2.0?

2019-07-22 16:56发布

is it possible at all? Seems easy to be done in the first version of the framework.

1条回答
孤傲高冷的网名
2楼-- · 2019-07-22 17:32

Instead of using

# Default database configuration
db.default.driver=org.h2.Driver
db.default.url="jdbc:h2:mem:play"

you should be able to just use

# FS database configuration
db.default.driver=org.h2.Driver
db.default.url="jdbc:h2:playdb"

This will create the file in the current working directory. See the H2 CheatSheet for more information

查看更多
登录 后发表回答