I get this error: Failed to load class "org.slf4j.impl.StaticLoggerBinder" ...?

0

I get the following error when executing the project:

  

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".   SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J:   See link for further   details.

This is the pom.xml file

<parent>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-parent</artifactId>
  <version>1.5.4.RELEASE</version>
  <relativePath/>
  </parent>

  <properties>

  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

  </properties>

  <dependencies>

  <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-mustache</artifactId>
  </dependency>

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

  </dependencies>
  <build>
  <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
            <source>1.8</source>
            <target>1.8</target>
            </configuration>

        </plugin>
    </plugins>
  </build>

</project>
    
asked by Libra2880 31.07.2017 в 01:00
source

2 answers

1

You need to add the dependency of SLF4J, along with the others.

<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>1.7.25</version>
</dependency>

Be sure to put the version you need, or remove the tag if the pon is configured to be automatically chosen by you.

    
answered by 31.07.2017 в 03:57
0

Look to solve it add the following library slf4j-nop.jar in the class path of your application

Source

    
answered by 28.11.2018 в 16:39