Spring boot Spring boot 2.0.9支持的Log4j2的更高版本是什么

Spring boot Spring boot 2.0.9支持的Log4j2的更高版本是什么,spring-boot,log4j2,Spring Boot,Log4j2,在我们的项目中,我们计划使用SpringBoot2.0.9版本。我想知道SpringFramework2.0.9支持的Log4j2的更高版本是什么 mvn dependency:tree gradle dependencies 这些命令将向您显示在将spring boot添加到pom或gradle文件时使用的依赖关系 +--- org.springframework.boot:spring-boot-starter-web:2.0.9.RELEASE | +--- org.springf

在我们的项目中,我们计划使用SpringBoot2.0.9版本。我想知道SpringFramework2.0.9支持的Log4j2的更高版本是什么

mvn dependency:tree
gradle dependencies
这些命令将向您显示在将spring boot添加到pom或gradle文件时使用的依赖关系

+--- org.springframework.boot:spring-boot-starter-web:2.0.9.RELEASE
|    +--- org.springframework.boot:spring-boot-starter:2.0.9.RELEASE
|    |    +--- org.springframework.boot:spring-boot:2.0.9.RELEASE
|    |    |    +--- org.springframework:spring-core:5.0.13.RELEASE
|    |    |    |    \--- org.springframework:spring-jcl:5.0.13.RELEASE
|    |    |    \--- org.springframework:spring-context:5.0.13.RELEASE
|    |    |         +--- org.springframework:spring-aop:5.0.13.RELEASE
|    |    |         |    +--- org.springframework:spring-beans:5.0.13.RELEASE
|    |    |         |    |    \--- org.springframework:spring-core:5.0.13.RELEASE (*)
|    |    |         |    \--- org.springframework:spring-core:5.0.13.RELEASE (*)
|    |    |         +--- org.springframework:spring-beans:5.0.13.RELEASE (*)
|    |    |         +--- org.springframework:spring-core:5.0.13.RELEASE (*)
|    |    |         \--- org.springframework:spring-expression:5.0.13.RELEASE
|    |    |              \--- org.springframework:spring-core:5.0.13.RELEASE (*)
|    |    +--- org.springframework.boot:spring-boot-autoconfigure:2.0.9.RELEASE
|    |    |    \--- org.springframework.boot:spring-boot:2.0.9.RELEASE (*)
|    |    +--- org.springframework.boot:spring-boot-starter-logging:2.0.9.RELEASE
|    |    |    +--- ch.qos.logback:logback-classic:1.2.3
|    |    |    |    +--- ch.qos.logback:logback-core:1.2.3
|    |    |    |    \--- org.slf4j:slf4j-api:1.7.25 -> 1.7.26
|    |    |    +--- org.apache.logging.log4j:log4j-to-slf4j:2.10.0
|    |    |    |    +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.26
|    |    |    |    \--- org.apache.logging.log4j:log4j-api:2.10.0
|    |    |    \--- org.slf4j:jul-to-slf4j:1.7.26
|    |    |         \--- org.slf4j:slf4j-api:1.7.26
|    |    +--- javax.annotation:javax.annotation-api:1.3.2
|    |    +--- org.springframework:spring-core:5.0.13.RELEASE (*)
|    |    \--- org.yaml:snakeyaml:1.19
|    +--- org.springframework.boot:spring-boot-starter-json:2.0.9.RELEASE
|    |    +--- org.springframework.boot:spring-boot-starter:2.0.9.RELEASE (*)
|    |    +--- org.springframework:spring-web:5.0.13.RELEASE
|    |    |    +--- org.springframework:spring-beans:5.0.13.RELEASE (*)
|    |    |    \--- org.springframework:spring-core:5.0.13.RELEASE (*)
|    |    +--- com.fasterxml.jackson.core:jackson-databind:2.9.8
|    |    |    +--- com.fasterxml.jackson.core:jackson-annotations:2.9.0
|    |    |    \--- com.fasterxml.jackson.core:jackson-core:2.9.8
|    |    +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.8
|    |    |    +--- com.fasterxml.jackson.core:jackson-core:2.9.8
|    |    |    \--- com.fasterxml.jackson.core:jackson-databind:2.9.8 (*)
|    |    +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.8
|    |    |    +--- com.fasterxml.jackson.core:jackson-annotations:2.9.0
|    |    |    +--- com.fasterxml.jackson.core:jackson-core:2.9.8
|    |    |    \--- com.fasterxml.jackson.core:jackson-databind:2.9.8 (*)
|    |    \--- com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.8
|    |         +--- com.fasterxml.jackson.core:jackson-core:2.9.8
|    |         \--- com.fasterxml.jackson.core:jackson-databind:2.9.8 (*)
|    +--- org.springframework.boot:spring-boot-starter-tomcat:2.0.9.RELEASE
|    |    +--- javax.annotation:javax.annotation-api:1.3.2
|    |    +--- org.apache.tomcat.embed:tomcat-embed-core:8.5.39
|    |    |    \--- org.apache.tomcat:tomcat-annotations-api:8.5.39
|    |    +--- org.apache.tomcat.embed:tomcat-embed-el:8.5.39
|    |    \--- org.apache.tomcat.embed:tomcat-embed-websocket:8.5.39
|    |         \--- org.apache.tomcat.embed:tomcat-embed-core:8.5.39 (*)
|    +--- org.hibernate.validator:hibernate-validator:6.0.16.Final
|    |    +--- javax.validation:validation-api:2.0.1.Final
|    |    +--- org.jboss.logging:jboss-logging:3.3.2.Final
|    |    \--- com.fasterxml:classmate:1.3.4
|    +--- org.springframework:spring-web:5.0.13.RELEASE (*)
|    \--- org.springframework:spring-webmvc:5.0.13.RELEASE
|         +--- org.springframework:spring-aop:5.0.13.RELEASE (*)
|         +--- org.springframework:spring-beans:5.0.13.RELEASE (*)
|         +--- org.springframework:spring-context:5.0.13.RELEASE (*)
|         +--- org.springframework:spring-core:5.0.13.RELEASE (*)
|         +--- org.springframework:spring-expression:5.0.13.RELEASE (*)
|         \--- org.springframework:spring-web:5.0.13.RELEASE (*)

SpringBoot对可以使用哪个版本的Log4j没有限制。spring-boot-starter-logging-log4j2预装了特定版本的log4j2。如果要使用较新的版本,请不要将spring-boot-starter-logging-log4j2作为依赖项,而是将log4j bom作为依赖项包含在依赖项管理中,然后包含要包含的特定log4j工件,而不要在依赖项上指定版本

例如:

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-bom</artifactId>
      <version>2.13.3</version>
      <type>pom</type>
    </dependency>
  </dependencies>
</dependencyManagement>
<dependencies>
  <dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-api</artifactId>
  </dependency>
  <dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-core</artifactId>
  </dependency>
</dependencies>

org.apache.logging.log4j
log4j物料清单
2.13.3
聚甲醛
org.apache.logging.log4j
log4japi
org.apache.logging.log4j
log4j型芯
maven存储库: