Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring Boot的可传递依赖项的Maven控件版本_Spring_Maven_Pom.xml - Fatal编程技术网

Spring Boot的可传递依赖项的Maven控件版本

Spring Boot的可传递依赖项的Maven控件版本,spring,maven,pom.xml,Spring,Maven,Pom.xml,我有一个简单的SpringBoot应用程序,我正在尝试将SpringCloud领事添加到其中。SpringCloud Consor依赖于更新版本的SpringBoot。在我的POM中,我为所有spring引导工件指定了版本1.3.5.RELEASE 问题是,即使为spring boot starter web指定了版本1.3.5,它仍然下载版本1.2.3的依赖项 有没有办法让maven获得所有spring引导工件的1.3.5.RELEASE,包括可传递依赖项?我知道我可以明确地列出它们,但是有更

我有一个简单的SpringBoot应用程序,我正在尝试将SpringCloud领事添加到其中。SpringCloud Consor依赖于更新版本的SpringBoot。在我的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>

org.springframework.boot
spring启动程序父级
1.3.6.1发布

并从spring启动依赖项中删除版本。

是的,简单使用正确的父项:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.3.6.RELEASE</version>
    <relativePath/> 
</parent>

org.springframework.boot
spring启动程序父级
1.3.6.1发布

并从spring启动依赖项中删除版本。

如果我不想使用父级,该怎么办?我尝试添加依赖关系管理,但没有成功。我仍然有问题。具体地说,它找不到内部类org/springframework/boot/Banner$Mode,尽管我在依赖关系管理1.3.6中指定了,但它仍然在使用1.2.3版本的spring boot JAR。因此,我最终要做的是让我的父级指定spring boot starter作为父级,这样做有效。如果我不想使用父级,该怎么办?我尝试添加依赖关系管理,但没有成功。我仍然有问题。具体地说,它找不到内部类org/springframework/boot/Banner$Mode,尽管我在依赖关系管理1.3.6中指定了,但它仍然在使用版本1.2.3的spring boot JAR,所以我最终做的是让我的父级指定spring boot starter作为父级,这是可行的