Create XxlJobAdminBean

2.1.2
jzl 5 years ago committed by GitHub
parent ff66e6c6c5
commit 80333db80e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,27 @@
package com.xxl.job.admin.conf;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @Auther: zhuolin.ji
* @Date: 2019/10/12 18:08
* @Package: com.xxl.job.admin.conf
* @Description:
*/
@Configuration
public class XxlJobAdminBean {
@Bean(name = "xxlJobAdminConfig")
public XxlJobAdminConfig getXxlJobAdminConfig() {
return new XxlJobAdminConfig();
}
@Bean(initMethod = "init", destroyMethod = "destroy")
public XxlJobScheduler getXxlJobScheduler(@Qualifier(value = "xxlJobAdminConfig") XxlJobAdminConfig xxlJobAdminConfig) {
XxlJobAdminConfig.setAdminConfig(xxlJobAdminConfig);
return new XxlJobScheduler();
}
}
Loading…
Cancel
Save