使用 H2 控制台访问 mem 或 fs 数据库表 [英] Access mem or fs database tables using H2 console

查看:41
本文介绍了使用 H2 控制台访问 mem 或 fs 数据库表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Play 中访问我的应用程序表!框架,但我无法使用控制台找到它.例如,我有两个实体模型:AddressCampus.

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控制台没有显示表AddressCampus.我使用默认设置登录 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆