Spring Cloud Sleuth 在没有 errors/warnings 的情况下退出
Spring Cloud Sleuth exited without errors/warnings
我正在关注站点 here and here,以使用 Spring Cloud Sleuth,但应用程序退出时没有任何警告/错误。
我已将依赖项添加到 build.gradle:
compile ('org.springframework.cloud:spring-cloud-starter-sleuth:1.0.0.RELEASE')
我已经尝试排除提到的公共日志记录 here:
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] DEBUG org.jboss.logging - Logging
Provider: org.jboss.logging.Log4j2LoggerProvider 11:57:31.956
[background-preinit] INFO
org.hibernate.validator.internal.util.Version - HV000001: Hibernate
Validator 6.0.11.Final 11:57:31.975 [background-preinit] DEBUG
org.hibernate.validator.internal.engine.resolver.TraversableResolvers
- Found javax.persistence.Persistence on classpath containing 'getPersistenceUtil'. Assuming JPA 2 environment. Trying to
instantiate JPA aware TraversableResolver 11:57:31.976
[background-preinit] DEBUG
org.hibernate.validator.internal.engine.resolver.TraversableResolvers
- Instantiated JPA aware TraversableResolver of type org.hibernate.validator.internal.engine.resolver.JPATraversableResolver.
11:57:31.980 [background-preinit] DEBUG
org.hibernate.validator.internal.xml.config.ValidationXmlParser -
Trying to load META-INF/validation.xml for XML based Validator
configuration. 11:57:31.981 [background-preinit] DEBUG
org.hibernate.validator.internal.xml.config.ResourceLoaderHelper -
Trying to load META-INF/validation.xml via TCCL 11:57:31.982
[background-preinit] DEBUG
org.hibernate.validator.internal.xml.config.ResourceLoaderHelper -
Trying to load META-INF/validation.xml via Hibernate Validator's class
loader 11:57:31.982 [background-preinit] DEBUG
org.hibernate.validator.internal.xml.config.ValidationXmlParser - No
META-INF/validation.xml found. Using annotation based configuration
only. 11:57:32.145 [background-preinit] DEBUG
org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator
- Loaded expression factory via original TCCL 11:57:32.152 [background-preinit] DEBUG
org.hibernate.validator.internal.engine.ValidatorFactoryImpl -
HV000234: Using
org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator
as ValidatorFactory-scoped message interpolator. 11:57:32.152
[background-preinit] DEBUG
org.hibernate.validator.internal.engine.ValidatorFactoryImpl -
HV000234: Using
org.hibernate.validator.internal.engine.resolver.JPATraversableResolver
as ValidatorFactory-scoped traversable resolver. 11:57:32.152
[background-preinit] DEBUG
org.hibernate.validator.internal.engine.ValidatorFactoryImpl -
HV000234: Using
org.hibernate.validator.internal.util.ExecutableParameterNameProvider
as ValidatorFactory-scoped parameter name provider. 11:57:32.152
[background-preinit] DEBUG
org.hibernate.validator.internal.engine.ValidatorFactoryImpl -
HV000234: Using
org.hibernate.validator.internal.engine.DefaultClockProvider as
ValidatorFactory-scoped clock provider. 11:57:32.152
[background-preinit] DEBUG
org.hibernate.validator.internal.engine.ValidatorFactoryImpl -
HV000234: Using
org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory
as ValidatorFactory-scoped script evaluator factory.
Process finished with exit code 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 引导项目。这样您就不必自己配置任何东西。
我正在关注站点 here and here,以使用 Spring Cloud Sleuth,但应用程序退出时没有任何警告/错误。
我已将依赖项添加到 build.gradle:
compile ('org.springframework.cloud:spring-cloud-starter-sleuth:1.0.0.RELEASE')
我已经尝试排除提到的公共日志记录 here:
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] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Log4j2LoggerProvider 11:57:31.956 [background-preinit] INFO org.hibernate.validator.internal.util.Version - HV000001: Hibernate Validator 6.0.11.Final 11:57:31.975 [background-preinit] DEBUG org.hibernate.validator.internal.engine.resolver.TraversableResolvers - Found javax.persistence.Persistence on classpath containing 'getPersistenceUtil'. Assuming JPA 2 environment. Trying to instantiate JPA aware TraversableResolver 11:57:31.976 [background-preinit] DEBUG org.hibernate.validator.internal.engine.resolver.TraversableResolvers - Instantiated JPA aware TraversableResolver of type org.hibernate.validator.internal.engine.resolver.JPATraversableResolver. 11:57:31.980 [background-preinit] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - Trying to load META-INF/validation.xml for XML based Validator configuration. 11:57:31.981 [background-preinit] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via TCCL 11:57:31.982 [background-preinit] DEBUG org.hibernate.validator.internal.xml.config.ResourceLoaderHelper - Trying to load META-INF/validation.xml via Hibernate Validator's class loader 11:57:31.982 [background-preinit] DEBUG org.hibernate.validator.internal.xml.config.ValidationXmlParser - No META-INF/validation.xml found. Using annotation based configuration only. 11:57:32.145 [background-preinit] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded expression factory via original TCCL 11:57:32.152 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as ValidatorFactory-scoped message interpolator. 11:57:32.152 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.engine.resolver.JPATraversableResolver as ValidatorFactory-scoped traversable resolver. 11:57:32.152 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider. 11:57:32.152 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider. 11:57:32.152 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory.
Process finished with exit code 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 引导项目。这样您就不必自己配置任何东西。