springcloud启动报错LoggerFactory is not a Logback LoggerContext but Logback...

本地启动微服务,直接报错LoggerFactory is not a Logback LoggerContext but Logback….,
查了一番,是logback搞得鬼,打开pom依赖树,搜索logback,发现在spring-boot-starter-web下有间接依赖上logback-classisc,搜索大神们的解答,就是在有这个依赖的dependency中除去他就行了

<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
        <exclusions>
                <exclusion>
                    <groupId>ch.qos.logback</groupId>
                   <artifactId>logback-classic</artifactId>
                </exclusion>
           </exclusions>
</dependency>

exclusion它就行了,重启,正常!

展开阅读全文

没有更多推荐了,返回首页