SpringBoot:Log4j
Aus Alexander's Wiki
Wenn man Log4j mit Spring Boot verwenden möchte, muss man Standard Logback Logger deaktivieren:
Platzhalter
und dann das Log4j Paket einbinden:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
Dieses Paket beinhaltet:
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</dependency>
Deren Version sollte seit CVE-2021-44228 mindestens 2.15.0 betragen.