xuxueli / xxl-job

A distributed task scheduling framework.(分布式任务调度平台XXL-JOB)
http://www.xuxueli.com/xxl-job/
GNU General Public License v3.0
27.46k stars 10.86k forks source link

由于springbean加载顺序的问题,在部分环境中会启动失败 #1479

Closed qbw2006 closed 4 years ago

qbw2006 commented 4 years ago

Please answer some questions before submitting your issue. Thanks!

Which version of XXL-JOB do you using?

v2.0.2

Expected behavior

启动成功

Actual behavior

启动失败

Steps to reproduce the behavior

使用jenkins打包,在部分centos7中启动失败

Other information

xxl-job-admin工程中有两个类XxlJobAdminConfig和XxlJobScheduler,XxlJobAdminConfig必须先于XxlJobScheduler加载才行。但是spring的类加载顺序跟操作系统有关,在某些centos7中,XxlJobAdminConfig后于XxlJobScheduler加载,导致启动失败。应该在类XxlJobScheduler上增加@DenpendOn("xxlJobAdminConfig")才能确保加载顺序正常。

xuxueli commented 4 years ago

最新版已经修复了这个问题。