package com.zy.common.properties; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Configuration; /** * 定时任务配置属性 * * @author system */ @Data @Configuration @ConfigurationProperties(prefix = "scheduler") public class SchedulerProperties { /** * 定时任务总开关,false时所有定时任务都不会启动 * 默认值为true,保持向后兼容 */ private boolean enabled = true; }