简体   繁体   中英

build gradle for hibernate usage in intellj

hey id like to know how i manage to build build gradle in intellj. i know how to do it in eclipse an it works fine. i want to connect a sqlite db to intellj like i do it in eclipse so i can insert soemthing over hibernate. this is how i do it in eclipse: i make a new gradle project then i write my buildgradle file 在此处输入图片说明

then i go rightclick on build.gradle and select "gradle" and then "refresh gradle"

now this works without eclipse telling me there was an error 在此处输入图片说明

i drag and drop my db here (name of db: spiel.db) 在此处输入图片说明

and then i write my hibernate.cfg.xml: 在此处输入图片说明

and now when i run my main everything is fine...

now i want to do the exact thing in intellj:

so i do new gradle project and then i write the same buildgradle file then i press build 在此处输入图片说明

and now intellj is complaining about my code 在此处输入图片说明

did i forget something?

It looks like some import problem, do you have hibernate support on? https://www.jetbrains.com/help/idea/overview-of-hibernate-support.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM