在Intellij中的项目之间共享数据库 [英] Sharing databases between projects within Intellij

查看:375
本文介绍了在Intellij中的项目之间共享数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Intellij来检查数据库,运行sql,查看表中的数据等。这一切都很好,但是我唯一缺少的是一次定义这些数据源并在我所有项目中查看它们的能力,即我可以共享它们之间的其他项目,而不必为新项目重新定义它们。

I use Intellij to inspect databases, run sql, view data in tables etc. This all works fine but the only thing I am missing is the ability to define these datasources once and view them in all my projects i.e. that I can share them between other projects and not have to redefine them for new projects. Is this possible in Intellij?

推荐答案

转到数据库工具窗口并点击数据源属性按钮。选择要设为全局的数据源。点击上方工具栏中的创建全局按钮。

Go to the Database tool window and click on the Data Source Properties button. Select the data source you want to make global. Click on the Make Global button in the tool bar above.

Make Global 按钮如下所示:

现在您可以使用您所有项目的数据源。但是,全局数据源未存储在项目文件中,因此从事同一项目的任何其他开发人员都需要定义自己的数据源。

Now you can use the data source from all your projects. However a global data source is not stored in the project files, so any other developers working on the same project will need to define their own data source.

这篇关于在Intellij中的项目之间共享数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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