我如何知道Spring Boot启动器依赖项为我的项目带来的传递依赖的版本?

时间:2016-12-04 17:26:49

标签: spring-boot

例如,如何找出Spring Boot spring-boot-starter-data-jpa启动程序依赖项带入项目的Hibernate版本?

4 个答案:

答案 0 :(得分:6)

the Appendix F. of the documentation spring-boot-dependencies 工件的 pom.xml 中提供了依赖项列表,您应该能够找到你的类路径。

您还可以在单​​独的分支中为每个已发布的版本转到Spring Boot的公共存储库和see the pom.xml

答案 1 :(得分:2)

为了补充Yuva的答案,如果你正在寻找hibernate的版本,你可以运行

gradle dependencyInsight --dependency hibernate --configuration compile

或者如果您的项目在项目根运行

下构建为multi-project

gradle submodule:dependencyInsight --dependency hibernate --configuration compile

该命令为what depends on hibernate in this project提供结果,而gradle dependencies给出what dependencies this project have的结果

答案 2 :(得分:0)

也可以在这里找到

https://docs.spring.io/spring-boot/docs/<version>/reference/htmlsingle/#appendix-dependency-versions

其中version是spring-boot-starter-parent版本。例如

https://docs.spring.io/spring-boot/docs/1.5.17.RELEASE/reference/htmlsingle/#appendix-dependency-versions

答案 3 :(得分:0)

我们可以从相应的类SpringBootVersion和SpringVersion获取Spring和SpringBoot的版本 SpringBootVersion.getVersion() SpringVersion.getVersion()

相关问题