Releases: yinjihuan/elastic-job-spring-boot-starter
Releases · yinjihuan/elastic-job-spring-boot-starter
BUG 修复
兼容spring boot 2.1.0
兼容spring boot 2.1.0
修复Spring Boot2.1.0版本问题
Spring Boot为2.1.0版本时启动会报下面的错误:
Description:
The bean 'jobConfParser', defined in class path resource [com/cxytiandi/elasticjob/autoconfigure/JobParserAutoConfiguration.class], could not be registered. A bean with that name has already been defined in URL [jar:file:/Users/yinjihuan/.m2/repository/com/github/yinjihuan/elastic-job-spring-boot-starter/1.0.2/elastic-job-spring-boot-starter-1.0.2.jar!/com/cxytiandi/elasticjob/parser/JobConfParser.class] and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
可以设置spring.main.allow-bean-definition-overriding=true临时解决,原因是新版本中不允许有相同的BeanName。这个版本修复了这个问题,根据jobName创建SpringJobScheduler
修改配置前缀,支持Spring Boot2.0
在Spring Boot2.0版本中,配置elasticJob不支持驼峰命名,现改成elastic.job
比如:
elastic.job.MySimpleJob.cron=0/10 * * * * ?