//package cn.freemud.config;
//
//import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
//import lombok.extern.log4j.Log4j2;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
///**
// * @author : xh.Z
// * @email : fisherman0510@163.com
// * @Date : 2021/4/26 下午6:21
// * @description :  xxl-job 配置
// */
//@Configuration
//@Log4j2
//public class XxlJobConfig {
//
//    @Value("${xxl.job.admin.addresses}")
//    private String adminAddresses;
//
//    @Value("${xxl.job.executor.appname}")
//    private String appName;
//
//    //@Value("${xxl.job.executor.ip}")
//    private String ip;
//
//    //@Value("${xxl.job.executor.port}")
//    private int port;
//
//    //@Value("${xxl.job.accessToken}")
//    private String accessToken;
//
//    @Value("${xxl.job.executor.logpath:/data/applogs/xxl-job/jobhandler}")
//    private String logPath;
//
//    @Value("${xxl.job.executor.logretentiondays:-1}")
//    private int logRetentionDays;
//
//
//    @Bean(initMethod = "start", destroyMethod = "destroy")
//    public XxlJobSpringExecutor xxlJobExecutor() {
//        log.info(">>>>>>>>>>> xxl-job config init.");
//        XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
//        xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
//        xxlJobSpringExecutor.setAppName(appName);
//        xxlJobSpringExecutor.setIp(ip);
//        xxlJobSpringExecutor.setPort(port);
//        xxlJobSpringExecutor.setAccessToken(accessToken);
//        xxlJobSpringExecutor.setLogPath(logPath);
//        xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
//
//        return xxlJobSpringExecutor;
//    }
//}
