commit
0b9153f136
3 changed files with 36 additions and 11 deletions
@ -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