Spring Boot 的传递依赖项的 Maven 控制版本
Maven control version of transitive dependencies of Spring Boot
我有一个简单的 spring 启动应用程序,我正在尝试将 spring 云领事添加到其中。 Spring cloud consul 依赖更新版本的 spring 启动。在我的 POM 中,我为所有 spring 引导工件指定了版本 1.3.5.RELEASE
。
问题是,即使为 spring-boot-starter-web
指定了版本 1.3.5,它仍然会下载版本 1.2.3
的依赖项
有没有办法让 Maven 为所有 spring 引导工件获取 1.3.5.RELEASE
,包括传递依赖项?我知道我可以明确列出所有这些,但是有更好的方法吗?
这是来自 eclipse 的 POM 依赖视图:
是的,简单使用正确的父级:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.6.RELEASE</version>
<relativePath/>
</parent>
并从 spring 引导依赖项中删除版本。
我有一个简单的 spring 启动应用程序,我正在尝试将 spring 云领事添加到其中。 Spring cloud consul 依赖更新版本的 spring 启动。在我的 POM 中,我为所有 spring 引导工件指定了版本 1.3.5.RELEASE
。
问题是,即使为 spring-boot-starter-web
指定了版本 1.3.5,它仍然会下载版本 1.2.3
有没有办法让 Maven 为所有 spring 引导工件获取 1.3.5.RELEASE
,包括传递依赖项?我知道我可以明确列出所有这些,但是有更好的方法吗?
这是来自 eclipse 的 POM 依赖视图:
是的,简单使用正确的父级:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.6.RELEASE</version>
<relativePath/>
</parent>
并从 spring 引导依赖项中删除版本。