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>
精彩评论