我有一个新的项目,我们正在做春天Brixton.SR1 ... 和Brixton.SR1或SR5建立在1.3.5.RELEASE上,但论坛上说它已经用1.4.0.RELEASE进行了测试,因此我想使用1.4.0的一些功能。
<dependencyManagement>
<dependencies>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-parent</artifactId>
<version>Brixton.SR1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
..
</dependencyManagement>
然后我们添加了依赖项,并且都使用了默认版本。例如,spring boot是1.3.5.RELEASE,所以当前结构如下所示。
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
....
但我想使用1.4.0。我可以排除1.3.5版本并使用这个新版本....我不想覆盖所有春季启动工件。例如......如下所示
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>1.4.0.RELEASE</version>
</dependency>
等等......
而是希望有一个弹簧引导工件的通用版本,并且应该为所有弹簧工件提供默认版本1.4.0
答案 0 :(得分:2)
只需将spring boot的1.4 bom和spring cloud导入你的pom.xml:
<dependencyManagement>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>1.4.0.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Brixton.SR5</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>