我试图找到成功运行带有MySQL数据库的Hibernate 5应用程序所需的maven依赖项。
答案 0 :(得分:1)
Hibernate5 和 mysql连接器的Maven依赖关系:
<!-- Hibernate5 dependecy-->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.0.2.Final</version>
</dependency>
<!-- MySQL database driver -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.37</version>
</dependency>
答案 1 :(得分:0)
需要添加以下依赖项才能成功运行带有mySQL数据库的Hibernate 5。
<dependencies>
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-validator -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.2.1.Final</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
</dependencies>