Maven Spring Boot Failed to instantiate SLF4J LoggerFactory Reported exception:

后端 未结 7 2232
再見小時候
再見小時候 2021-02-15 15:22

I am following the tutorial https://spring.io/guides/gs/actuator-service/

And when I try to run the App I get:

Failed to instantiate SLF4J LoggerF

7条回答
  •  一向
    一向 (楼主)
    2021-02-15 16:08

    See that message: (you manage dependency duplicate, for dependency transitive, that cause dependency duplicate with differents versions)

    Class path contains multiple SLF4J bindings. SLF4J: Found binding in

    make a test if use IDE Eclipse

    short cut key: Shift+Ctrl+T

    that way you see what file has contains this class:

    SLF4J: Found binding in [jar:file:
    /C:/Users/Josh/.m2/repository/ch/qos/logback/logback-classic/1.1.7/logback-classic-1.1.7.jar!
    /org/slf4j/impl/StaticLoggerBinder.class]
    [jar:file:/C:/Users/Josh/.m2/repository/org/slf4j/slf4j-log4j12/1.7.21/slf4j-log4j12-1.7.21.jar!
    /org/slf4j/impl/StaticLoggerBinder.class]
    

    repeat class in

    slf4j-log4j12-1.7.21.jar
    logback-classic-1.1.7.jar
    

    find your same dependency and exclusion what don't you need in your project

    that way:

    
    org.seleniumhq.selenium
    selenium-java
    3.0.0-beta2
    test
    
        
            xml-apis
            xml-apis
        
    
    

    that one example, change for your context

提交回复
热议问题