首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何改变等级依赖的传递版本?

如何改变等级依赖的传递版本?
EN

Stack Overflow用户
提问于 2019-01-05 15:39:35
回答 1查看 146关注 0票数 0

我有一个分级多模块项目。我需要使用hibernate的精确版本。

在存储库模块中添加了一个

代码语言:javascript
复制
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)

我有以下模块的层次结构

代码语言:javascript
复制
+--controller
  + --service
    + --repository

服务模块似乎使用了hibernate 5.0.12.Final。

我找到了有关configurations.all的信息,但是不可能排除特定版本的依赖。

在所有模块中是否都有使用hibernate 4.2.15的方法?

EN

回答 1

Stack Overflow用户

发布于 2022-06-24 12:20:58

代码语言:javascript
复制
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'
        }
    }
}

exclude.html

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54053516

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档