我得到的错误消息org.hibernate.MappingException: Unknown entity当我试图集成hibernate5.0与MySQL 这似乎是hibernate5.0.0和5.0.1的一个问题。 这与hibernate4.3.9工作正常 Maven的依赖 <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>5.0.0.Final</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.36</version> </dependency> 的hibernate.cfg.xml <session-factory> <!– Database connection settings –> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="connection.url">jdbc:mysql://localhost:3307/SampleDB </property> <property name="connection.username">root</property> <property name="connection.password"></property> <!– JDBC connection pool (use the built-in) –> <property name="connection.pool_size">1</property> <property name="dialect">org.hibernate.dialect.MySQLDialect</property> <!– Echo all executed SQL to stdout –> <property name="show_sql">true</property> <!– […]