no applicable action for [springProfile], current ElementPath is [[configuration][springProfile]]
今天down了一个开源项目,启动后一直存在如下错误信息:
ERROR in ch.qos.logback.core.joran.spi.Interpreter@26:42 - no applicable action for [springProfile], current ElementPath is [[configuration][springProfile]]
ERROR in ch.qos.logback.core.joran.spi.Interpreter@27:50 - no applicable action for [logger], current ElementPath is [[configuration][springProfile][logger]]
ERROR in ch.qos.logback.core.joran.spi.Interpreter@30:35 - no applicable action for [springProfile], current ElementPath is [[configuration][springProfile]]
ERROR in ch.qos.logback.core.joran.spi.Interpreter@31:50 - no applicable action for [logger], current ElementPath is [[configuration][springProfile][logger]]
按照官方文档将logback.xml改为logback-spring.xml后问题解决。
logback.xml和logback-spring.xml都可以用来配置logback,但是两者的加载顺序是不一样的,具体顺序如下:
logback.xml--->application.properties--->logback-spring.xml
从上边的加载顺序可以看出,logback.xml加载早于application.properties,所以如果你在logback.xml使用了变量时,而恰好这个变量是写在application.properties中,那么就会获取不到,报上边的错误信息。
no applicable action for [springProfile], current ElementPath is [[configuration][springProfile]]的更多相关文章
- 记使用aliyun-log-logback-appender 报错no applicable action for [encoder], current ElementPath is [[configuration][appender][encoder]]
依赖: <dependency> <groupId>com.aliyun.openservices</groupId> <artifactId>aliy ...
- 【异常】ERROR in ch.qos.logback.core.joran.spi.Interpreter@159:22 - no applicable action for [charset], current ElementPath is [[configuration][appender][encoder][charset]]
一.异常信息 Exception in thread "restartedMain" java.lang.reflect.InvocationTargetException at ...
- Logback报错 no applicable action for [Encoding], current ElementPath is [[configuration][appender][Encoding]]
老版本是0.9,移到springboot项目,解决办法,删除xml配置文件节点<Encoding>UTF-8</Encoding>
- Logback新版本报no applicable action for [Encoding]问题
logback.xml配置文件如下: <?xml version="1.0" encoding="UTF-8"?> <configuratio ...
- Spring 错误日志
13:19:14.437 [main] DEBUG org.springframework.boot.context.logging.ClasspathLoggingApplicationListen ...
- SpringBoot文档翻译系列——26.日志logging
原创作品,可以转载,但是请标注出处地址:http://www.cnblogs.com/V1haoge/p/7613854.html 这是SpringBoot的日志内容 26 日志 Spring使用Co ...
- Spring Boot Reference Guide
Spring Boot Reference Guide Authors Phillip Webb, Dave Syer, Josh Long, Stéphane Nicoll, Rob Winch, ...
- 第5章 Spring Boot 功能
Spring Boot 功能 本节将会介绍Spring Boot的一些细节. 在这里,您可以了解您将要使用和自定义的主要功能. 如果还没有准备好,您可能需要阅读第二部分“入门指南”和第三部分“使用 S ...
- 20191112 Spring Boot官方文档学习(4.4)
4.4.日志 Spring Boot使用Commons Logging进行所有内部日志记录,但是使底层日志实现打开状态.为Java Util Logging,Log4J2和Logback提供了默认配置 ...
随机推荐
- Spring Boot下Bean定义方式及调用方式
我们知道如果我们要在一个类使用spring提供的bean对象,我们需要把这个类注入到spring容器中,交给spring容器进行管理,但是在实际当中,我们往往会碰到在一个普通的Java类中,想直接使用 ...
- python 进程数据通信
进程通信的第一种方式from multiprocessing import Process,Queue def f(q): q.put([42,2,'hello']) print('zi q id:' ...
- luogu P1533 可怜的狗狗 |莫队+二分
题目背景 小卡由于公务需要出差,将新家中的狗狗们托付给朋友嘉嘉,但是嘉嘉是一个很懒的人,他才没那么多时间帮小卡喂狗狗. 题目描述 小卡家有N只狗,由于品种.年龄不同,每一只狗都有一个不同的漂亮值.漂亮 ...
- 使用docker安装gitlab,两台电脑gitlab库相互迁移
原文来自合伙呀 https://hehuoya.com/2019/09/30/gitlab-docker/ Docker for gitlab brew cask install docker do ...
- 关于source insight 置顶窗口或者处于前台挡住窗口解决办法
两个办法,分别如下: 1.重启source insight: 2.按两次F11:
- java中的7个位运算运算符
位运算指的是针对整数的二进制进行的位移操作. 位运算提供比算术运算更高的效率,但是位运算的代码可读性较差,建议所有使用位运算的地方写上注释. Java中提供7个位运算符用于位运算. 左移(<&l ...
- LinkedHashMap 的核心就 2 点,搞清楚,也就掌握了
HashMap 有一个不足之处就是在迭代元素时与插入顺序不一致.而大多数人都喜欢按顺序做某些事情,所以,LinkedHashMap 就是针对这一点对 HashMap 进行扩展,主要新增了「两种迭代方式 ...
- java get请求带参数报错 java.io.IOException: Server returned HTTP response code: 400 for URL
解决方案 在使用JAVA发起http请求的时候,经常会遇到这个错误,我们copy请求地址在浏览器中运行的时候又是正常运行的,造成这个错误的原因主要是因为请求的URL中包含空格,这个时候我们要使用URL ...
- ScheduledThreadPoolExecutor使用指南
ScheduledThreadPoolExecutor是Timer的多线程实现版本,JDK官方推荐使用.ScheduledThreadPoolExecutor用于替代Timer.是接口Schedule ...
- DSAPI CMD命令行进程代理
DSAPI.文件.CMD命令行进程代理,是用来和CMD.exe或指定exe进行输出重定向的简化使用工具,可隐藏或显式地启动一个cmd.exe,并将输出流.输入流和错误流重定向至代理,通过事件触发方式与 ...