|
|
|
@ -1,6 +1,7 @@ |
|
|
|
|
package com.dxhy.order.consumer.config; |
|
|
|
|
|
|
|
|
|
import com.xxl.job.core.executor.XxlJobExecutor; |
|
|
|
|
|
|
|
|
|
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
|
import org.springframework.cloud.context.config.annotation.RefreshScope; |
|
|
|
@ -41,10 +42,10 @@ public class XxlJobConfig { |
|
|
|
|
private int logRetentionDays; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Bean(initMethod = "start", destroyMethod = "destroy") |
|
|
|
|
public XxlJobExecutor xxlJobExecutor() { |
|
|
|
|
@Bean |
|
|
|
|
public XxlJobSpringExecutor xxlJobExecutor() { |
|
|
|
|
log.info(">>>>>>>>>>> xxl-job config init."); |
|
|
|
|
XxlJobExecutor xxlJobExecutor = new XxlJobExecutor(); |
|
|
|
|
XxlJobSpringExecutor xxlJobExecutor = new XxlJobSpringExecutor(); |
|
|
|
|
xxlJobExecutor.setAdminAddresses(adminAddresses); |
|
|
|
|
xxlJobExecutor.setAppname(appName); |
|
|
|
|
xxlJobExecutor.setIp(ip); |
|
|
|
|