parent
ff66e6c6c5
commit
80333db80e
@ -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…
Reference in new issue