TsfScheduleConfiguration冲突导致无法启动问题

TsfScheduleConfiguration冲突导致无法启动问题

问题现象

java.lang.IllegalStateException: @Bean method TsfScheduleConfiguration.tsfTaskExecutor called as bean reference for type [java.util.concurrent.ScheduledExecutorService] but overridden by non-compatible bean instance of type [org.springframework.cloud.sleuth.instrument.async.TraceableExecutorService]. Overriding bean of same name declared in: class path resource [org/springframework/tsf/core/config/TsfScheduleConfiguration.class]
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference(ConfigurationClassEnhancer.java:420) ~[spring-context-5.0.11.RELEASE.jar:5.0.11.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:368) ~[spring-context-5.0.11.RELEASE.jar:5.0.11.RELEASE]
	at org.springframework.tsf.core.config.TsfScheduleConfiguration$$EnhancerBySpringCGLIB$$be08a012.tsfTaskExecutor(<generated>) ~[spring-cloud-tsf-core-1.14.2-Finchley-RELEASE.jar:1.14.2-Finchley-RELEASE]
	at org.springframework.tsf.core.config.TsfScheduleConfiguration.configureTasks(TsfScheduleConfiguration.java:25) ~[spring-cloud-tsf-core-1.14.2-Finchley-RELEASE.jar:1.14.2-Finchley-RELEASE]
	at org.springframework.tsf.core.scheduling.TsfScheduledAnnotationBeanPostProcessor.finishRegistration(TsfScheduledAnnotationBeanPostProcessor.java:243) ~[spring-cloud-tsf-core-1.14.2-Finchley-RELEASE.jar:1.14.2-Finchley-RELEASE]
	at org.springframework.tsf.core.scheduling.TsfScheduledAnnotationBeanPostProcessor.onApplicationEvent(TsfScheduledAnnotationBeanPostProcessor.java:217) ~[spring-cloud-tsf-core-1.14.2-Finchley-RELEASE.jar:1.14.2-Finchley-RELEASE]
	at org.springframework.tsf.core.scheduling.TsfScheduledAnnotationBeanPostProcessor.onApplicationEvent(TsfScheduledAnnotationBeanPostProcessor.java:108) ~[spring-cloud-tsf-core-1.14.2-Finchley-RELEASE.jar:1.14.2-Finchley-RELEASE]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.0.11.RELEASE.jar:5.0.11.RELEASE]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.0.11.RELEASE.jar:5.0.11.RELEASE]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.0.11.RELEASE.jar:5.0.11.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:400) ~[spring-context-5.0.11.RELEASE.jar:5.0.11.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:354) ~[spring-context-5.0.11.RELEASE.jar:5.0.11.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:886) ~[spring-context-5.0.11.RELEASE.jar:5.0.11.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:163) ~[spring-boot-2.0.7.RELEASE.jar:2.0.7.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551) ~[spring-context-5.0.11.RELEASE.jar:5.0.11.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.0.7.RELEASE.jar:2.0.7.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) [spring-boot-2.0.7.RELEASE.jar:2.0.7.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386) [spring-boot-2.0.7.RELEASE.jar:2.0.7.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-2.0.7.RELEASE.jar:2.0.7.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1242) [spring-boot-2.0.7.RELEASE.jar:2.0.7.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1230) [spring-boot-2.0.7.RELEASE.jar:2.0.7.RELEASE]
	at pdfc.platform.Application.main(Application.java:29) [classes/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_201]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_201]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_201]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_201]
	at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.0.7.RELEASE.jar:2.0.7.RELEASE]

解决方法

排除如下包

	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-devtools</artifactId>
		<scope>runtime</scope>
	</dependency>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值