添加控制task是否执行配置business:task-enabled: false为true是执行,false不执行,缺省默认为true只行,只有没有前置微服务版本配置false;
This commit is contained in:
@@ -14,6 +14,7 @@ import com.njcn.message.constant.RedisKeyPrefix;
|
||||
import com.njcn.redis.utils.RedisUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -35,6 +36,7 @@ import java.util.stream.Collectors;
|
||||
@Component
|
||||
@EnableScheduling
|
||||
@RequiredArgsConstructor
|
||||
@ConditionalOnProperty(name = "business.task-enabled", havingValue = "true", matchIfMissing = true)
|
||||
public class DeviceComflagTasks {
|
||||
private final NodeMapper nodeMapper;
|
||||
private final IDeviceService iDeviceService;
|
||||
|
||||
Reference in New Issue
Block a user