为intellj中的hibernate用法构建gradle

时间:2017-11-15 13:25:08

标签: java hibernate intellij-idea gradle

嘿,我想知道我是如何在intellj中构建构建gradle的。 我知道如何在日食中做到这一点它工作得很好。 我想连接一个sqlite数据库到intellj就像我在eclipse中这样做,所以我可以在hibernate上插入soemthing。 这就是我在eclipse中的表现: 我做了一个新的gradle项目 然后我写我的buildgradle文件 enter image description here

然后我右键单击build.gradle并选择" gradle"然后"刷新gradle"

现在没有eclipse就可以告诉我有错误 enter image description here

我在这里拖放我的数据库(db:spiel.db的名称) enter image description here

然后我写了我的hibernate.cfg.xml: enter image description here

现在,当我运行我的主要一切都很好......

现在我想在intellj中做一些确切的事情:

所以我做了新的gradle项目然后我写了相同的buildgradle文件 然后我按下构建 enter image description here

现在intellj抱怨我的代码 enter image description here

我忘记了什么吗?

1 个答案:

答案 0 :(得分:0)

看起来有点导入问题,你有hibernate支持吗? https://www.jetbrains.com/help/idea/overview-of-hibernate-support.html