开发者

package org.hibernate.cfg does not exist import org.hibernate.cfg.Configuration;

开发者 https://www.devze.com 2023-01-07 14:19 出处:网络
I\'m 开发者_开发技巧using hibernate & I got this error during compilation: package org.hibernate.cfg does not exist

I'm 开发者_开发技巧using hibernate & I got this error during compilation:

package org.hibernate.cfg does not exist
   import org.hibernate.cfg.Configuration;


Did you add the hibernate jar in the build path. Because compiler is not able to find the jar which has this package. So add it and try. Are you using any IDE??


It seems you don't have hibernate.jar in your classpath.


Add the below dependency to your pom.xml file, save and Maven will do the rest work:

<dependency>
   <groupId>org.hibernate</groupId>
   <artifactId>hibernate-core</artifactId>
   <version>5.5.3.Final</version>
</dependency>
0

精彩评论

暂无评论...
验证码 换一张
取 消