Commit 80333db8 by jzl Committed by GitHub

Create XxlJobAdminBean

parent ff66e6c6
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();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment