使用H2控制台访问mem或fs数据库表 [英] Access mem or fs database tables using H2 console
本文介绍了使用H2控制台访问mem或fs数据库表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在Play中访问我的应用程序的表!框架,但是我无法使用控制台找到它.
例如,我有两个实体模型:Address
和Campus
.
I'm trying to access my application's tables in Play! Framework, but I can't find it using the console.
For instance, I have two entity models: Address
and Campus
.
我可以创建对象并正常保存,但是我想查看fs或mem DB中的更改,但是H2控制台未显示表Address
和Campus
.我正在使用默认设置登录localhost:9000/@db
.
I can create objects and save normally, but I would like to see the changes in fs or mem DB, but the H2 console doesn't show the tables Address
and Campus
. I'm using the default settings to log in localhost:9000/@db
.
我在做什么错了?
谢谢.
推荐答案
内存数据库的正确URL是:
The correct URL for the inmemory database is:
jdbc:h2:mem:name-of-your-play-db
这篇关于使用H2控制台访问mem或fs数据库表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文