no applicable action for [springProfile], current ElementPath is [[configuration][springProfile]]

Spring启动时logback打印出很多日志,还有错误信息

09:00:16,520 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
09:00:16,520 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
09:00:16,520 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/E:/workspace/shangde/shangde-business-expert/target/classes/logback.xml]
09:00:17,035 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
09:00:17,153 |-INFO in ch.qos.logback.core.joran.util.ConfigurationWatchListUtil@78e16155 - Adding [jar:file:/E:/work/Maven/repo/org/springframework/boot/spring-boot/1.5.12.RELEASE/spring-boot-1.5.12.RELEASE.jar!/org/springframework/boot/logging/logback/base.xml] to configuration watch list.
09:00:17,153 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@54a3ab8f - URL [jar:file:/E:/work/Maven/repo/org/springframework/boot/spring-boot/1.5.12.RELEASE/spring-boot-1.5.12.RELEASE.jar!/org/springframework/boot/logging/logback/base.xml] is not of type file
09:00:17,171 |-INFO in ch.qos.logback.core.joran.util.ConfigurationWatchListUtil@78e16155 - Adding [jar:file:/E:/work/Maven/repo/org/springframework/boot/spring-boot/1.5.12.RELEASE/spring-boot-1.5.12.RELEASE.jar!/org/springframework/boot/logging/logback/defaults.xml] to configuration watch list.
09:00:17,171 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@54a3ab8f - URL [jar:file:/E:/work/Maven/repo/org/springframework/boot/spring-boot/1.5.12.RELEASE/spring-boot-1.5.12.RELEASE.jar!/org/springframework/boot/logging/logback/defaults.xml] is not of type file
09:00:17,194 |-INFO in ch.qos.logback.core.joran.action.ConversionRuleAction - registering conversion word clr with class [org.springframework.boot.logging.logback.ColorConverter]
09:00:17,194 |-INFO in ch.qos.logback.core.joran.action.ConversionRuleAction - registering conversion word wex with class [org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter]
09:00:17,194 |-INFO in ch.qos.logback.core.joran.action.ConversionRuleAction - registering conversion word wEx with class [org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter]
09:00:17,197 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [org.springframework.boot.logging.logback.LevelRemappingAppender]
09:00:17,211 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [DEBUG_LEVEL_REMAPPER]
09:00:17,296 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache.catalina.startup.DigesterFactory] to ERROR
09:00:17,297 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache.catalina.util.LifecycleBase] to ERROR
09:00:17,297 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache.coyote.http11.Http11NioProtocol] to WARN
09:00:17,297 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache.sshd.common.util.SecurityUtils] to WARN
09:00:17,297 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache.tomcat.util.net.NioSelectorPool] to WARN
09:00:17,297 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.crsh.plugin] to WARN
09:00:17,297 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.crsh.ssh] to WARN
09:00:17,297 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.eclipse.jetty.util.component.AbstractLifeCycle] to ERROR
09:00:17,297 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.hibernate.validator.internal.util.Version] to WARN
09:00:17,297 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.springframework.boot.actuate.autoconfigure.CrshAutoConfiguration] to WARN
09:00:17,297 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting additivity of logger [org.springframework.boot.actuate.endpoint.jmx] to false
09:00:17,297 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [DEBUG_LEVEL_REMAPPER] to Logger[org.springframework.boot.actuate.endpoint.jmx]
09:00:17,299 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting additivity of logger [org.thymeleaf] to false
09:00:17,299 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [DEBUG_LEVEL_REMAPPER] to Logger[org.thymeleaf]
09:00:17,300 |-INFO in ch.qos.logback.core.joran.util.ConfigurationWatchListUtil@78e16155 - Adding [jar:file:/E:/work/Maven/repo/org/springframework/boot/spring-boot/1.5.12.RELEASE/spring-boot-1.5.12.RELEASE.jar!/org/springframework/boot/logging/logback/console-appender.xml] to configuration watch list.
09:00:17,300 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@54a3ab8f - URL [jar:file:/E:/work/Maven/repo/org/springframework/boot/spring-boot/1.5.12.RELEASE/spring-boot-1.5.12.RELEASE.jar!/org/springframework/boot/logging/logback/console-appender.xml] is not of type file
09:00:17,302 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
09:00:17,317 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CONSOLE]
09:00:17,318 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:00:17,402 |-INFO in ch.qos.logback.core.joran.util.ConfigurationWatchListUtil@78e16155 - Adding [jar:file:/E:/work/Maven/repo/org/springframework/boot/spring-boot/1.5.12.RELEASE/spring-boot-1.5.12.RELEASE.jar!/org/springframework/boot/logging/logback/file-appender.xml] to configuration watch list.
09:00:17,402 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@54a3ab8f - URL [jar:file:/E:/work/Maven/repo/org/springframework/boot/spring-boot/1.5.12.RELEASE/spring-boot-1.5.12.RELEASE.jar!/org/springframework/boot/logging/logback/file-appender.xml] is not of type file
09:00:17,404 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
09:00:17,425 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE]
09:00:17,468 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:00:17,591 |-INFO in ch.qos.logback.core.rolling.FixedWindowRollingPolicy@1968a49c - No compression will be used
09:00:17,598 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: C:\Users\WANGCH~1\AppData\Local\Temp\/spring.log
09:00:17,598 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [C:\Users\WANGCH~1\AppData\Local\Temp\/spring.log]
09:00:17,624 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
09:00:17,624 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE] to Logger[ROOT]
09:00:17,624 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to Logger[ROOT]
09:00:17,624 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
09:00:17,624 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [LOGFILE]
09:00:17,643 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@1780399359 - No compression will be used
09:00:17,645 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy@1780399359 - Will use the pattern ./logs/shangde-business-expert.%d{yyyy-MM-dd}.log for the active file
09:00:17,725 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern './logs/shangde-business-expert.%d{yyyy-MM-dd}.log'.
09:00:17,726 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
09:00:17,762 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to Thu Dec 06 09:00:17 CST 2018
09:00:17,784 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[LOGFILE] - This appender no longer admits a layout as a sub-component, set an encoder instead.
09:00:17,784 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[LOGFILE] - To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.
09:00:17,784 |-WARN in ch.qos.logback.core.rolling.RollingFileAppender[LOGFILE] - See also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details
09:00:17,785 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
09:00:17,787 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[LOGFILE] - Active log file name: ./logs/shangde-business-expert.2018-12-06.log
09:00:17,787 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[LOGFILE] - File property is set to [null]
09:00:17,789 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
09:00:17,789 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CONSOLE] to Logger[ROOT]
09:00:17,789 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [LOGFILE] to Logger[ROOT]
09:00:17,792 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@26:42 - no applicable action for [springProfile], current ElementPath  is [[configuration][springProfile]]
09:00:17,792 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@27:50 - no applicable action for [logger], current ElementPath  is [[configuration][springProfile][logger]]
09:00:17,793 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@30:35 - no applicable action for [springProfile], current ElementPath  is [[configuration][springProfile]]
09:00:17,793 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@31:50 - no applicable action for [logger], current ElementPath  is [[configuration][springProfile][logger]]
09:00:17,793 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.springframework.web] to INFO
09:00:17,793 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.wawscm.shangde.module.security.shiro.filter.StatelessPermissionsAuthorizationFilter] to WARN
09:00:17,794 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.wawscm.shangde.module.security.shiro.filter.StatelessAuthcFilter] to WARN
09:00:17,794 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
09:00:17,797 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@19868320 - Registering current configuration as safe fallback point

这是因为如果项目中配置的日志文件的名称是logback.xml的话,logback会先与Spring之前加载日志配置,这时日志文件中的springProfile的配置是无效的。按照官方文档的说法将logback.xml改为logback-spring.xml就可以了。

  • 19
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

大扑棱蛾子

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值