diff --git a/arex-storage-config/pom.xml b/arex-storage-config/pom.xml
index fd1ac277..2757fcf3 100644
--- a/arex-storage-config/pom.xml
+++ b/arex-storage-config/pom.xml
@@ -45,7 +45,7 @@
arex-storage-service
com.arextest
- 1.0.55
+ 1.0.56
diff --git a/arex-storage-config/src/main/java/com/arextest/config/model/dao/config/InstancesCollection.java b/arex-storage-config/src/main/java/com/arextest/config/model/dao/config/InstancesCollection.java
index e29cb3b9..b35bfde3 100644
--- a/arex-storage-config/src/main/java/com/arextest/config/model/dao/config/InstancesCollection.java
+++ b/arex-storage-config/src/main/java/com/arextest/config/model/dao/config/InstancesCollection.java
@@ -24,4 +24,5 @@ public class InstancesCollection extends BaseEntity {
private Map tags;
private Map systemEnv;
private Map systemProperties;
+ private Map extendField;
}
diff --git a/arex-storage-config/src/main/java/com/arextest/config/model/dto/application/InstancesConfiguration.java b/arex-storage-config/src/main/java/com/arextest/config/model/dto/application/InstancesConfiguration.java
index d8310864..1c0dc025 100644
--- a/arex-storage-config/src/main/java/com/arextest/config/model/dto/application/InstancesConfiguration.java
+++ b/arex-storage-config/src/main/java/com/arextest/config/model/dto/application/InstancesConfiguration.java
@@ -20,4 +20,5 @@ public class InstancesConfiguration extends AbstractConfiguration {
private Map tags;
private Map systemEnv;
private Map systemProperties;
+ private Map extendField;
}
diff --git a/arex-storage-model/pom.xml b/arex-storage-model/pom.xml
index 5d8a098b..99248ee9 100644
--- a/arex-storage-model/pom.xml
+++ b/arex-storage-model/pom.xml
@@ -7,7 +7,7 @@
arex-storage-service
com.arextest
- 1.0.55
+ 1.0.56
diff --git a/arex-storage-web-api/pom.xml b/arex-storage-web-api/pom.xml
index 11f708ce..dd8b29a4 100644
--- a/arex-storage-web-api/pom.xml
+++ b/arex-storage-web-api/pom.xml
@@ -123,7 +123,7 @@
arex-storage-service
com.arextest
- 1.0.55
+ 1.0.56
diff --git a/arex-storage-web-api/src/main/java/com/arextest/storage/web/controller/config/AgentRemoteConfigurationController.java b/arex-storage-web-api/src/main/java/com/arextest/storage/web/controller/config/AgentRemoteConfigurationController.java
index 33ba20b8..ec5029cc 100644
--- a/arex-storage-web-api/src/main/java/com/arextest/storage/web/controller/config/AgentRemoteConfigurationController.java
+++ b/arex-storage-web-api/src/main/java/com/arextest/storage/web/controller/config/AgentRemoteConfigurationController.java
@@ -24,6 +24,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import java.util.Set;
import java.util.TimeZone;
import java.util.concurrent.CompletableFuture;
@@ -61,6 +62,7 @@ public final class AgentRemoteConfigurationController {
private static final String EMPTY_TIME = "0";
private static final String LAST_MODIFY_TIME = "If-Modified-Since";
private static final String INCLUDE_SERVICE_OPERATIONS = "includeServiceOperations";
+
@Resource
private ConfigurableHandler dynamicClassHandler;
@Resource
@@ -112,6 +114,12 @@ public Response load(@RequestBody AgentRemoteConfigurationRequest request) {
serviceCollectConfiguration.getRecordMachineCountLimit());
Set recordingHosts =
instances.stream().map(InstancesConfiguration::getHost).collect(Collectors.toSet());
+ InstancesConfiguration sourceInstance = instances.stream()
+ .filter(instance -> Objects.equals(instance.getHost(), (request.getHost())))
+ .findFirst().orElse(null);
+ if (sourceInstance != null && sourceInstance.getExtendField() != null) {
+ body.getExtendField().putAll(sourceInstance.getExtendField());
+ }
if (recordingHosts.contains(request.getHost())) {
body.setTargetAddress(request.getHost());
} else {
diff --git a/pom.xml b/pom.xml
index bb0e230a..1da11a23 100644
--- a/pom.xml
+++ b/pom.xml
@@ -408,5 +408,5 @@
https://github.com/arextest/arex-storage
- 1.0.55
+ 1.0.56
\ No newline at end of file