Spring Boot Test时遇到的问题

         在测试spring boot的test时,出现以下信息后,项目停止不动。

11:12:13,079 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
11:12:13,079 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
11:12:13,080 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/Users/lixinghao/company/com_tujia/gitlab/tujia_java_crm/crm-app/target/test-classes/logback.xml]
11:12:13,080 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath.
11:12:13,081 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/Users/lixinghao/company/com_tujia/gitlab/tujia_java_crm/crm-app/target/test-classes/logback.xml]
11:12:13,081 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [file:/Users/lixinghao/company/com_tujia/gitlab/tujia_java_crm/crm-app/target/classes/logback.xml]
11:12:13,141 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
11:12:13,147 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeFilter scanning period to 1 minutes
11:12:13,147 |-INFO in ReconfigureOnChangeFilter{invocationCounter=0} - Will scan for changes in [[/Users/lixinghao/company/com_tujia/gitlab/tujia_java_crm/crm-app/target/test-classes/logback.xml]] every 60 seconds. 
11:12:13,147 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Adding ReconfigureOnChangeFilter as a turbo filter
11:12:18,165 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
11:12:18,170 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CRM_APP_ALL]
11:12:18,215 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use gz compression
11:12:18,216 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use the pattern CATALINA_BASE_IS_UNDEFINED/logs/crm/crm_app_all-%d{yyyy-MM-dd}.log for the active file
11:12:18,219 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern 'CATALINA_BASE_IS_UNDEFINED/logs/crm/crm_app_all-%d{yyyy-MM-dd}.log.gz'.
11:12:18,219 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
11:12:18,219 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to Fri Jul 26 11:11:27 CST 2019
11:12:18,220 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
11:12:18,242 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[CRM_APP_ALL] - Active log file name: CATALINA_BASE_IS_UNDEFINED/logs/crm_app_all.log
11:12:18,242 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[CRM_APP_ALL] - File property is set to [CATALINA_BASE_IS_UNDEFINED/logs/crm_app_all.log]
11:12:18,243 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.AsyncAppender]
11:12:18,244 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [CRM_APP_ALL_ASYNC]
11:12:18,255 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CRM_APP_ALL] to ch.qos.logback.classic.AsyncAppender[CRM_APP_ALL_ASYNC]
11:12:18,255 |-INFO in ch.qos.logback.classic.AsyncAppender[CRM_APP_ALL_ASYNC] - Attaching appender named [CRM_APP_ALL] to AsyncAppender.
11:12:18,256 |-INFO in ch.qos.logback.classic.AsyncAppender[CRM_APP_ALL_ASYNC] - Setting discardingThreshold to 0
11:12:18,256 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
11:12:18,256 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [CRM_APP_ALL_ASYNC] to Logger[ROOT]
11:12:18,256 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.xxl.job.core] to WARN
11:12:18,256 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
11:12:18,257 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@3d921e20 - Registering current configuration as safe fallback point

        发现在打印完logback的日志后,项目就停止不在运行。在查看了网上的各种操作之后,也没有很好的解决。后来想着既然是因为logback的问题不在向下执行,暂时将logback.xml过滤掉,不在防止logback.xml。结果发现可以正常运行测试项目。

        看网上其他博客说,出现这个问题的原因是因为maven依赖的jar包有冲突,目前尚未从jar包的冲突问题解决,(ps:小编也不大会怎么看jar包的冲突问题)。不过小编也会持续更新的哦。

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值