bladex-boot集成xxl-job后,出现循环依赖问题

Blade 未结 1 398
horacehe15
horacehe15 剑童 2023-01-05 11:04

一、该问题的重现步骤是什么?

1. 在一个全新的bladex-boot工程中。

2. 在pom文件中引入xxl-job-core依赖

3.新增一个xxl的配置类文件src/main/java/org/springblade/common/config/BladeXxlJobConfig.java

4.启动项目。出现循环依赖报错。错误日志如下:

2023-01-05 10:37:38.998 ERROR 14748 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

The dependencies of some of the beans in the application context form a cycle:

┌──->──┐
|  xxlJobExecutor defined in class path resource [org/springblade/common/config/BladeXxlJobConfig.class]
└──<-──┘


Action:

Relying upon circular references is discouraged and they are prohibited by default. Update your application to remove the dependency cycle between beans. As a last resort, it may be possible to break the cycle automatically by setting spring.main.allow-circular-references to true.


Process finished with exit code 1

image.png


image.png

二、你期待的结果是什么?实际看到的又是什么?

希望在bladex-boot工程中集成xxl-job并正常启动。


三、你正在使用的是什么产品,什么版本?在什么操作系统上?


四、请提供详细的错误堆栈信息,这很重要。


五、若有更多详细信息,请在下面提供。

1条回答
  • boot版本没必要集成,直接单独使用xxl-job就行。

    1 讨论(0)
提交回复