java - Spring Cloud Sleuth 退出时没有错误/警告
问题描述
我正在关注此处和此处的站点,以使用 Spring Cloud Sleuth,但应用程序退出时没有任何警告/错误。
我添加了对 build.gradle 的依赖:
compile ('org.springframework.cloud:spring-cloud-starter-sleuth:1.0.0.RELEASE')
我试图排除这里提到的公共日志记录:
compile ('org.springframework.cloud:spring-cloud-starter-sleuth:1.0.0.RELEASE')
{
exclude module: 'commons.logging'
exclude group: 'commons.logging'
}
但仍然没有运气。这是控制台输出:
11:57:31.952 [background-preinit] 调试 org.jboss.logging - 日志提供程序:org.jboss.logging.Log4j2LoggerProvider 11:57:31.956 [background-preinit] 信息 org.hibernate.validator.internal.util.Version - HV000001:Hibernate Validator 6.0.11.Final 11:57:31.975 [background-preinit] 调试 org.hibernate.validator.internal.engine.resolver.TraversableResolvers - 在包含“getPersistenceUtil”的类路径上找到 javax.persistence.Persistence。假设 JPA 2 环境。尝试实例化 JPA 感知 TraversableResolver 11:57:31.976 [background-preinit] 调试 org.hibernate.validator.internal.engine.resolver.TraversableResolvers - 实例化 JPA 感知 TraversableResolver 类型为 org.hibernate.validator.internal.engine.resolver.JPATraversableResolver . 11:57:31.980 [背景预初始化]调试 org.hibernate.validator。internal.xml.config.ValidationXmlParser - 尝试为基于 XML 的验证器配置加载 META-INF/validation.xml。11:57:31.981 [background-preinit] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - 尝试通过 TCCL 加载 META-INF/validation.xml 11:57:31.982 [background-preinit] DEBUG org。 hibernate.validator.internal.xml.config.ResourceLoaderHelper - 试图通过 Hibernate Validator 的类加载器加载 META-INF/validation.xml 11:57:31.982 [background-preinit] DEBUG org.hibernate.validator.internal.xml.config。 ValidationXmlParser - 未找到 META-INF/validation.xml。仅使用基于注释的配置。11:57:32.145 [background-preinit] 调试 org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - 通过原始 TCCL 11:57:32 加载表达式工厂。152 [background-preinit] 调试 org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234:使用 org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator 作为 ValidatorFactory 范围的消息插值器。11:57:32.152 [background-preinit] 调试 org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234:使用 org.hibernate.validator.internal.engine.resolver.JPATraversableResolver 作为 ValidatorFactory 范围的可遍历解析器。11:57:32.152 [background-preinit] 调试 org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234:使用 org.hibernate.validator.internal.util.ExecutableParameterNameProvider 作为 ValidatorFactory 范围的参数名称提供程序。11:57:32.152 [背景预初始化]调试 org.hibernate.validator.internal.engine。ValidatorFactoryImpl - HV000234:使用 org.hibernate.validator.internal.engine.DefaultClockProvider 作为 ValidatorFactory 范围的时钟提供程序。11:57:32.152 [background-preinit] 调试 org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234:使用 org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory 作为 ValidatorFactory 范围的脚本评估器工厂。
进程以退出代码 1 结束
更新
我已将依赖项更新为
compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-sleuth', version: '2.1.0.RELEASE'
但是应用程序仍然无法启动,这里是日志:
2019-02-13 15:45:25.001 INFO [-,,,] 20148 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@20deea7f: startup date [Wed Feb 13 15:45:24 HKT 2019]; root of context hierarchy
2019-02-13 15:45:25.345 INFO [-,,,] 20148 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$adc7b00a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.4.RELEASE)
2019-02-13 15:45:25.551 INFO [-,,,] 20148 --- [ main] c.s.m.ABCServiceApplication : The following profiles are active: dev
Process finished with exit code 1
解决方案
您正在使用古老版本的 Sleuth。请问可以用最新的吗?转到 start.spring.io 并使用 sleuth 生成一个 Spring Boot 项目。这样您就不必自己配置任何东西。
推荐阅读
- c++ - push_back 复制对象即使是临时的,尽管在它的定义中另有说明?
- vb.net - IIS 上的 Visual Basic Web API 返回 404 错误
- html - Html 视频标签无法加载本地路径
- numpy - np.genfromtxt 在什么情况下会读入空数组
- javascript - 如何将函数对象导出到另一个函数对象 javascript (nuxt)?
- algorithm - 一个基因测序分析的算法问题
- javascript - 为什么选择正确答案后我的分数没有增加?
- javascript - || 如何 操作员工作,为什么不工作呢?
- rust - 匹配Option内的值时如何获取可变变量绑定?
- groovy - 使用 HTTPBuilder 发送原始正文数据