【发布时间】:2018-03-27 07:29:06
【问题描述】:
我的 POM 中有 spring-boot-starter,版本由 Camden 依赖管理系统自动解析。
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Camden.SR6</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Spring Boot -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
</dependencies>
这给了我 spring-boot-starter 的 1.4.3.RELEASE 版本。
spring boot starter 自动包含在 maven 依赖项中的 jars 之一是 logback-classic: 1.1.18
ch.qos.logback_logback-core 版本 1.1.8 有一个漏洞,因此我想切换到 logback 版本 1.2 此漏洞在以下链接中进行了说明
https://nvd.nist.gov/vuln/detail/CVE-2017-5929
现在,有没有办法将 logback 版本从 spring-boot-starter 自动解析到的 1.2 覆盖,这样我就不会受到这个漏洞的影响?
【问题讨论】:
-
视情况而定。如果您使用
spring-boot-starter-parent作为项目的parent,则只需在properties部分定义您想要的版本,否则将其添加到dependencyManagement部分以覆盖其他版本集。
标签: spring-boot pom.xml