update 更新xxl-job执行器开关功能
This commit is contained in:
parent
3117080be3
commit
2e4689d557
@ -16,6 +16,8 @@ spring:
|
|||||||
--- # xxl-job 配置
|
--- # xxl-job 配置
|
||||||
xxl:
|
xxl:
|
||||||
job:
|
job:
|
||||||
|
# 执行器开关
|
||||||
|
enabled: true
|
||||||
# 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
|
# 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
|
||||||
admin-addresses: http://localhost:9100/xxl-job-admin
|
admin-addresses: http://localhost:9100/xxl-job-admin
|
||||||
# 执行器通讯TOKEN:非空时启用
|
# 执行器通讯TOKEN:非空时启用
|
||||||
|
@ -16,6 +16,8 @@ spring:
|
|||||||
--- # xxl-job 配置
|
--- # xxl-job 配置
|
||||||
xxl:
|
xxl:
|
||||||
job:
|
job:
|
||||||
|
# 执行器开关
|
||||||
|
enabled: true
|
||||||
# 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
|
# 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
|
||||||
admin-addresses: http://172.30.0.92:9100/xxl-job-admin
|
admin-addresses: http://172.30.0.92:9100/xxl-job-admin
|
||||||
# 执行器通讯TOKEN:非空时启用
|
# 执行器通讯TOKEN:非空时启用
|
||||||
|
@ -5,6 +5,7 @@ import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
|
|||||||
import com.yomahub.tlog.springboot.lifecircle.TLogXxljobEnhanceInit;
|
import com.yomahub.tlog.springboot.lifecircle.TLogXxljobEnhanceInit;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
@ -18,6 +19,7 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
@Configuration
|
@Configuration
|
||||||
@EnableConfigurationProperties(XxlJobProperties.class)
|
@EnableConfigurationProperties(XxlJobProperties.class)
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@ConditionalOnProperty(prefix = "xxl.job", name = "enabled", havingValue = "true")
|
||||||
public class XxlJobConfig {
|
public class XxlJobConfig {
|
||||||
|
|
||||||
private final XxlJobProperties xxlJobProperties;
|
private final XxlJobProperties xxlJobProperties;
|
||||||
|
@ -13,6 +13,8 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||||||
@ConfigurationProperties(prefix = "xxl.job")
|
@ConfigurationProperties(prefix = "xxl.job")
|
||||||
public class XxlJobProperties {
|
public class XxlJobProperties {
|
||||||
|
|
||||||
|
private Boolean enabled;
|
||||||
|
|
||||||
private String adminAddresses;
|
private String adminAddresses;
|
||||||
|
|
||||||
private String accessToken;
|
private String accessToken;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user