springboot配置log4j2报错:java.lang.IllegalStateException: Logback configuration error detected:
引入log4j2后启动报错。
Exception in thread "main" java.lang.IllegalStateException: java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.joran.spi.Interpreter@7:17 - no applicable action for [Properties], current ElementPath is [[Configuration][Properties]]
ERROR in ch.qos.logback.core.joran.spi.Interpreter@8:35 - no applicable action for [Property], current ElementPath is [[Configuration][Properties][Property]]
ERROR in ch.qos.logback.core.joran.spi.Interpreter@9:36 - no applicable action for [Property], current ElementPath is [[Configuration][Properties][Property]]
ERROR in ch.qos.logback.core.joran.spi.Interpreter@10:41 - no applicable action for [Property], current ElementPath is [[Configuration][Properties][Property]]
ERROR in ch.qos.logback.core.joran.spi.Interpreter@13:16 - no applicable action for [Appenders], current ElementPath is [[Configuration][Appenders]]
ERROR in ch.qos.logback.core.joran.spi.Interpreter@15:53 - no applicable action for [Console], current ElementPath is [[Configuration][Appenders][Console]]
ERROR in ch.qos.logback.core.joran.spi.Interpreter@16:57 - no applicable action for [PatternLayout], current ElementPath is [[Configuration][Appenders][Console][PatternLayout]]
ERROR in ch.qos.logback.core.joran.spi.Interpreter@21:14 - no applicable action for [Loggers], current ElementPath is [[Configuration][Loggers]]
ERROR in ch.qos.logback.core.joran.spi.Interpreter@24:58 - no applicable action for [Logger], current ElementPath is [[Configuration][Loggers][Logger]]
经查找原因:是由于引入的log4j2和spring-boot-starter-web默认的日志配置冲突。
解决方法:
将spring-boot-starter-web默认的日志排除掉:
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId><exclusions><exclusion><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-logging</artifactId></exclusion></exclusions></dependency>
springboot配置log4j2报错:java.lang.IllegalStateException: Logback configuration error detected:相关推荐
- springboot集成logback,报错java.lang.IllegalStateException: Logback configuration error detected:
最近需要将一个springboot项目部署到一台新服务器上.而且新服务器是完全copy了旧服务器的环境与项目.但是在新服务器上启动该springboot项目,就一直报错 2019-03-18 18:5 ...
- Spring Boot与Log4j2集成之java.lang.IllegalStateException: Logback configuration error detected:
引言: 一个问题的分析与解决过程是表与里的过程,是一个大胆猜测与小心求证的过程,spring boot与log4j2的集成过程中,我将描述一下分析这个问题的思路和过程. 我一直强调一点: 重要的不是解 ...
- logback启动报错,IllegalStateException: Logback configuration error detected...
报错信息: Caused by: java.lang.IllegalStateException: Logback configuration error detected: ERROR in ch. ...
- Spring Boot单元测试报错java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]
一:运行test类方法时候报错 报错 java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. S ...
- SpringBoot+MyBatis启动报错java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
2019独角兽企业重金招聘Python工程师标准>>> 如题,在启动SpringBoot时报SpringBoot+MyBatis启动报错java.lang.NoClassDefFou ...
- 报错 java.lang.IllegalStateException: Could not load TestContextBootstrapper [null]. Specify @Bootstra
由于我maven仓库之前已经有了有个5.0.10的test包 导致我的变量 <org.springframework.version>4.2.5.RELEASE</org.sprin ...
- 解决Hbase报错java.lang.IllegalStateException: The procedure WAL relies on the ability to hsync for....
完整报错为: java.lang.IllegalStateException: The procedure WAL relies on the ability to hsync for proper ...
- 解决:room无论如何怎么修改数据库版本都报错java.lang.IllegalStateException: Room cannot verify the data integrity
问题描述 这已经是第二次遇到这个bug了,第一次卡了一两天,这次卡了半天. bug: java.lang.IllegalStateException: Room cannot verify the d ...
- Android Studio报错 “java.lang.IllegalStateException: Room cannot verify the data integrity” 解决方法
最近在Android Studio遇到以下报错: Caused by: java.lang.IllegalStateException: Room cannot verify the data int ...
最新文章
- 我的工作日报 - 2020-9-16 星期三
- Junit3.8源码--核心类
- 收藏 | 深度学习框架简史:TensorFlow和PyTorch双头垄断
- C语言libcurl:Uses the CURLINFO_TLS_SESSION data.
- .htaccess更改目录下的默认主页
- gitlab两种连接方式:ssh和http配置介绍
- mysql 单例模式_php基于单例模式封装mysql类完整实例
- Hvv近期0day总结二
- ArcGis for JavaScript 4.23版本接入国家天地矢量地图
- 无限维乘积空间(彼此独立)的测度(完)
- 厦门大学c语言2017,厦门大学2017年各专业录取分数线
- 百度地图 实现 热力图
- 小白安装cadence virtuoso
- 位数不足前面补0mysql语句_SQL语句 不足位数补0
- Javaweb1:HTML、各种标签
- VR全景拍摄如何正确的拍摄?全景摄影大赛等你来
- 机架式服务器物理尺寸,1U机架式服务器机箱尺寸长宽高
- 鼠标控制两台台式机_台式机和控制台上的真棒实时GI
- hjr-MUD游戏(二):HTML5-APP客户端编写
- 2006-2020年10月各类型国债利率