java.lang.RuntimeException: xxl-job jobhandler[...] naming conflicts.

Springboot 集成 xxl-job 分布式定时任务调度平台,启动时报错如下:

java.lang.RuntimeException: xxl-job jobhandler[payTimeOutOrderDealTAsk] naming conflicts.
	at com.xxl.job.core.executor.XxlJobExecutor.registJobHandler(XxlJobExecutor.java:199) ~[xxl-job-core-2.4.0.jar:na]
	at com.xxl.job.core.executor.impl.XxlJobSpringExecutor.initJobHandlerMethodRepository(XxlJobSpringExecutor.java:120) ~[xxl-job-core-2.4.0.jar:na]
	at com.xxl.job.core.executor.impl.XxlJobSpringExecutor.afterSingletonsInstantiated(XxlJobSpringExecutor.java:38) ~[xxl-job-core-2.4.0.jar:na]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:863) ~[spring-beans-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:863) ~[spring-context-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) ~[spring-context-5.1.3.RELEASE.jar:5.1.3.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.1.1.RELEASE.jar:2.1.1.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.1.RELEASE.jar:2.1.1.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.1.RELEASE.jar:2.1.1.RELEASE]
    ...

这个错误就是定时任务命名重复了,这个简单改了就好。

但是如果改了也不行,也没有找到重复的,可以尝试去掉 @RefreshScope 标签。

你可能感兴趣的:(Java,java,xxl-job,springboot)