|
@@ -30,6 +30,12 @@ public class SystemStartup implements ApplicationRunner {
|
|
|
|
|
|
public void start() {
|
|
public void start() {
|
|
|
|
|
|
|
|
+ Boolean enabled = PropertyHolder.getBoolean("task.scheduleJob.enabled", true);
|
|
|
|
+
|
|
|
|
+ if (!enabled) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
String appName = PropertyHolder.getString("spring.application.name");
|
|
String appName = PropertyHolder.getString("spring.application.name");
|
|
if (StringUtils.isNotBlank(appName)) {
|
|
if (StringUtils.isNotBlank(appName)) {
|
|
List<ServiceInstance> instances = discoveryClient.getInstances(appName);
|
|
List<ServiceInstance> instances = discoveryClient.getInstances(appName);
|