0

Following the other answers I did exclude this, but I started getting ERROR An exception occurred processing Appender http java.lang.IllegalArgumentException:

        <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
        <exclusions>
            <exclusion>
               <groupId>org.springframework.boot</groupId>
               <artifactId>spring-boot-starter-logging</artifactId>
            </exclusion>
         </exclusions>
         </dependency>

I need to fix the SLF4J bindings as it is preventing my Logs to go to Splunk :

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/app.jar!/BOOT-INF/lib/logback-classic- 
      1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/app.jar!/BOOT-INF/lib/log4j-slf4j-impl- 
      2.11.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings  for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
GKr297
  • 185
  • 2
  • 16

1 Answers1

0

Check your dependency tree with maven command:

mvn dependency:tree

You will find there the dependency which provides existing SL4J binding. Then just change the exclusion to this one.

More information here: Spring Boot: multiple SLF4J bindings

Marcin Rzepecki
  • 578
  • 4
  • 10