我有一个分级多模块项目。我需要使用hibernate的精确版本。
在存储库模块中添加了一个
compile("org.springframework.boot:spring-boot-starter-data-jpa:1.5.15.RELEASE") {
exclude group: 'org.hibernate', module: 'hibernate-core'
exclude group: 'org.hibernate', module: 'hibernate-entitymanager'
}
compile "org.hibernate:hibernate-core:4.2.15.Final"
compile "org.hibernate:hibernate-entitymanager:4.2.15.Final"(spring 1.5.15 hibernate使用hibernate 5.0.12.Final)
我有以下模块的层次结构
+--controller
+ --service
+ --repository服务模块似乎使用了hibernate 5.0.12.Final。
我找到了有关configurations.all的信息,但是不可能排除特定版本的依赖。
在所有模块中是否都有使用hibernate 4.2.15的方法?
发布于 2022-06-24 12:20:58
dependencies {
implementation('org.springframework.boot:spring-boot-starter-data-jpa:1.5.15.RELEASE')
implementation ('org.hibernate:hibernate-core') {
version {
strictly '4.2.15.Final'
}
}
implementation ('org.hibernate:hibernate-entitymanager') {
version {
strictly '4.2.15.Final'
}
}
}https://stackoverflow.com/questions/54053516
复制相似问题