我是靠谱客的博主 专注航空,这篇文章主要介绍log4j2 log4j-slf4j-impl cannot be present with log4j-to-slf4j,现在分享给大家,希望可以做个参考。
springboot内置了一个日志模块,报错原因就是这个起了冲突
解决办法就是把原本的日志模块去除
在pom文件里添加:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
最后
以上就是专注航空最近收集整理的关于log4j2 log4j-slf4j-impl cannot be present with log4j-to-slf4j的全部内容,更多相关log4j2内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复