I recommend to use the same versions that are used by Spring Boot. (I do not mean that you should use Spring-Boot, just use the same set of dependencies/versions).
Spring Boot has some kind ob BOM-depencency, that contains the dependencies:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>1.2.3.RELEASE</version>
</dependency>
The current version of spring-boot: 1.2.3.RELEASE uses Spring 4.1.6.RELEASE, so you must maybe search for one boot that is a bit older.
Even Spring-Boot
1.2.0.RELEASE
use Spring 4.1.3.RELEASE
- so you Either update to Spring >= 4.1.3. or you ignore this version mismatch.
After you have chosen the rigth Spring-Boot Version: You either check out this file and search for the version number you need, or you import it in to your pom.xml
, and the omit the explicit version
attribute in your hibernate-dependency>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>1.2.3.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
...
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<!-- version is taken from the bom -->
</dependency>
</dependencies>