我刚刚注意到我的1.5 spring启动项目在更新后继续使用hibernate 4。 我使用的是gradle:
buildscript {
ext {
springBootVersion = '1.5.10.RELEASE'
}
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
}
}
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'idea'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'war'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
springBoot {
configurations {
provided.all*.exclude group: 'javax.servlet'
}
dependencies {
// compile('org.springframework.boot:spring-boot-starter-tomcat')
// compile('org.springframework.cloud:spring-cloud-starter-zuul')
// compile('org.springframework.boot:spring-boot-starter-security')
// compile("org.springframework.boot:spring-boot-starter-web:1.5.10.RELEASE")
compile("org.springframework.cloud:spring-cloud-starter-security")
compile('org.springframework.cloud:spring-cloud-starter-oauth2')
compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-data-rest')
compile('org.springframework.boot:spring-boot-starter-mail')
compile('org.springframework.boot:spring-boot-starter-velocity')
compile('org.springframework.boot:spring-boot-starter-social-facebook')
compile("org.springframework.boot:spring-boot-starter-websocket")
compile('mysql:mysql-connector-java:5.1.38')
//------------------------------------------------------------------------------------------------------------------
// rxjava
//------------------------------------------------------------------------------------------------------------------
compile group: 'io.reactivex', name: 'rxjava', version: '1.1.6'
//------------------------------------------------------------------------------------------------------------------
// retrofit
//------------------------------------------------------------------------------------------------------------------
compile 'com.google.code.gson:gson:2.7'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile group: 'com.squareup.retrofit2', name: 'adapter-rxjava', version: '2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
//------------------------------------------------------------------------------------------------------------------
// JODATIME
//------------------------------------------------------------------------------------------------------------------
compile 'joda-time:joda-time:2.9.7'
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
testCompile('org.springframework.boot:spring-boot-starter-test')
//------------------------------------------------------------------------------------------------------------------
// VELOCITY
//------------------------------------------------------------------------------------------------------------------
compile group: 'org.apache.velocity', name: 'velocity-tools', version: '2.0'
//------------------------------------------------------------------------------------------------------------------
// BRAINTREE paypal checkout solution
// https://mvnrepository.com/artifact/com.braintreepayments.gateway/braintree-java
//------------------------------------------------------------------------------------------------------------------
compile group: 'com.braintreepayments.gateway', name: 'braintree-java', version: '2.73.0'
//------------------------------------------------------------------------------------------------------------------
// AWS cloud object storage use and others
// https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-aws-context
//------------------------------------------------------------------------------------------------------------------
//compile group: 'org.springframework.cloud', name: 'spring-cloud-aws-context', version: '1.2.2.RELEASE'
compile group: 'com.amazonaws', name: 'aws-java-sdk', version: '1.11.259'
compile group: 'com.amazonaws', name: 'aws-java-sdk-s3', version: '1.11.259'
compile group: 'com.amazonaws', name: 'aws-java-sdk-core', version: '1.11.259'
}
}
问题是,文档说它现在默认使用hibernate 5.0,当我重新加载我的项目时,我继续使用4.3.11 for hibernate-core ... 如果你们知道,那就太好了......
编辑1:我添加了完整的gradle代码。不要以为这会改变一些东西,但