mirror of
https://github.com/201206030/novel.git
synced 2025-04-27 07:30:50 +00:00
feat: 增加 XXL-JOB 开关
This commit is contained in:
parent
9eb967402a
commit
d7a7580c4e
@ -5,6 +5,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@ -15,6 +16,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
* @date 2022/5/31
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnProperty(prefix = "xxl.job", name = "enable", havingValue = "true")
|
||||
@Slf4j
|
||||
public class XxlJobConfig {
|
||||
|
||||
|
@ -61,6 +61,8 @@ spring:
|
||||
# XXL-JOB 配置
|
||||
xxl:
|
||||
job:
|
||||
# 是否开启 XXL-JOB:true-开启 false-不开启
|
||||
enable: false
|
||||
admin:
|
||||
### 调度中心部署根地址 [选填]:如调度中心集群部署存在多个地址则用逗号分隔。执行器将会使用该地址进行"执行器心跳注册"和"任务结果回调";为空则关闭自动注册;
|
||||
addresses: http://127.0.0.1:8080/xxl-job-admin
|
||||
|
Loading…
x
Reference in New Issue
Block a user