修改xxl-job服务器地址设置setAddress改为setAdminAddresses

This commit is contained in:
yang 2020-11-21 22:57:26 +08:00
parent d7bc5f822f
commit 0588c4a707

View File

@ -51,10 +51,10 @@ public class XxlJobAutoConfiguration {
.flatMap(s -> discoveryClient.getInstances(s).stream()).map(instance -> String .flatMap(s -> discoveryClient.getInstances(s).stream()).map(instance -> String
.format("http://%s:%s/%s", instance.getHost(), instance.getPort(), XXL_JOB_ADMIN)) .format("http://%s:%s/%s", instance.getHost(), instance.getPort(), XXL_JOB_ADMIN))
.collect(Collectors.joining(",")); .collect(Collectors.joining(","));
xxlJobSpringExecutor.setAddress(serverList); xxlJobSpringExecutor.setAdminAddresses(serverList);
} }
else { else {
xxlJobSpringExecutor.setAddress(xxlJobProperties.getAdmin().getAddresses()); xxlJobSpringExecutor.setAdminAddresses(xxlJobProperties.getAdmin().getAddresses());
} }
return xxlJobSpringExecutor; return xxlJobSpringExecutor;