java.lang.NoClassDefFoundError:Lorg / apache / logging / log4j / Logger;

java.lang.NoClassDefFoundError:Lorg / apache / logging / log4j / Logger;

启动springboot项目的时候,发现这个异常

java.lang.NoClassDefFoundErrorLorg / apache / logging / log4j / Logger;

然, 查看jar包发现, log4j是存在jar包的,但是不管怎样刷新maven都是这个问题

later
解决办法:
1.重新拉取项目
2.添加 log4j 依赖

<!-- Logging -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>${log4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>${log4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-web</artifactId>
            <version>${log4j.version}</version>
        </dependency>

你可能感兴趣的:(奇形怪状异常专栏,1024程序员节,异常,log4j)