Repository: huaweicloud/sermant
Issue: 【bug】配置项为list时，yaml会抛出解析错误的bug

### What happened?

配置项为list时，yaml会抛出解析错误的bug

### How can we reproduce it (as minimally and precisely as possible)?

配置项为list时，yaml会抛出解析错误的bug

### Anything else we need to know?

_No response_

### Sermant version

<details>
0.6.1
</details>


### OS version

n/a

Changed files:
sermant-plugins/sermant-router/router-config-service/src/main/java/com/huaweicloud/sermant/router/config/handler/ServiceConfigHandler.java
sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/java/com/huawei/dubbo/registry/listener/GovernanceConfigListener.java
sermant-plugins/sermant-router/router-config-service/src/main/java/com/huaweicloud/sermant/router/config/handler/RouterConfigHandler.java
sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/subscribe/processor/ConfigOrderIntegratedProcessor.java
sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/config/RegistryConfigResolver.java

diff --git a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/subscribe/processor/ConfigOrderIntegratedProcessor.java b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/subscribe/processor/ConfigOrderIntegratedProcessor.java
index ab536eeb..f8aebe96 100644
--- a/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/subscribe/processor/ConfigOrderIntegratedProcessor.java
+++ b/sermant-agentcore/sermant-agentcore-core/src/main/java/com/huaweicloud/sermant/core/plugin/subscribe/processor/ConfigOrderIntegratedProcessor.java
@@ -138,11 +138,16 @@ public class ConfigOrderIntegratedProcessor implements ConfigProcessor {
             targetHolder.getHolder().getOrDefault(originEvent.getKey(), new HashMap<>(CAP_SIZE));
         olderDataMap.clear();
         if (originEvent.getEventType() != DynamicConfigEventType.DELETE) {
-            Optional<Map<String, Object>> dataMap = yamlConverter.convert(originEvent.getContent(), Map.class);
-            if (!dataMap.isPresent()) {
+            Optional<Object> convert = yamlConverter.convert(originEvent.getContent(), Object.class);
+            if (!convert.isPresent()) {
                 return false;
             }
-            olderDataMap.putAll(dataMap.get());
+            Object obj = convert.get();
+            if (obj instanceof Map) {
+                olderDataMap.putAll((Map<String, Object>) obj);
+            } else {
+                olderDataMap.put(originEvent.getKey(), obj);
+            }
         }
         targetHolder.getHolder().put(originEvent.getKey(), olderDataMap);
         return true;
diff --git a/sermant-plugins/sermant-router/router-config-service/src/main/java/com/huaweicloud/sermant/router/config/handler/RouterConfigHandler.java b/sermant-plugins/sermant-router/router-config-service/src/main/java/com/huaweicloud/sermant/router/config/handler/RouterConfigHandler.java
index a87025ad..66ecd6cb 100644
--- a/sermant-plugins/sermant-router/router-config-service/src/main/java/com/huaweicloud/sermant/router/config/handler/RouterConfigHandler.java
+++ b/sermant-plugins/sermant-router/router-config-service/src/main/java/com/huaweicloud/sermant/router/config/handler/RouterConfigHandler.java
@@ -16,7 +16,6 @@
 
 package com.huaweicloud.sermant.router.config.handler;
 
-import com.huaweicloud.sermant.core.plugin.subscribe.processor.OrderConfigEvent;
 import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent;
 import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEventType;
 import com.huaweicloud.sermant.router.common.constants.RouterConstant;
@@ -81,24 +80,6 @@ public class RouterConfigHandler extends AbstractConfigHandler {
     }
 
     private Map<String, String> getRouteRuleMap(DynamicConfigEvent event) {
-        if (event instanceof OrderConfigEvent) {
-            Map<String, Object> allData = ((OrderConfigEvent) event).getAllData();
-            String prefix =
-                RouterConstant.ROUTER_CONFIG_SERVICECOMB_KEY + "." + RouterConstant.ROUTER_CONFIG_ROUTE_RULE_KEY + ".";
-            Map<String, String> routeRuleMap = new HashMap<>();
-            for (Entry<String, Object> entry : allData.entrySet()) {
-                if (!entry.getKey().startsWith(prefix)) {
-                    continue;
-                }
-                Object value = entry.getValue();
-                if (value instanceof String) {
-                    routeRuleMap.put(entry.getKey().substring(prefix.length()), (String) value);
-                } else {
-                    routeRuleMap.put(entry.getKey().substring(prefix.length()), yaml.dump(value));
-                }
-            }
-            return routeRuleMap;
-        }
         String content = event.getContent();
         Map<String, Map<String, Map<String, String>>> load = yaml.load(content);
         if (CollectionUtils.isEmpty(load)) {
diff --git a/sermant-plugins/sermant-router/router-config-service/src/main/java/com/huaweicloud/sermant/router/config/handler/ServiceConfigHandler.java b/sermant-plugins/sermant-router/router-config-service/src/main/java/com/huaweicloud/sermant/router/config/handler/ServiceConfigHandler.java
index 2171b11d..6520ce2c 100644
--- a/sermant-plugins/sermant-router/router-config-service/src/main/java/com/huaweicloud/sermant/router/config/handler/ServiceConfigHandler.java
+++ b/sermant-plugins/sermant-router/router-config-service/src/main/java/com/huaweicloud/sermant/router/config/handler/ServiceConfigHandler.java
@@ -16,9 +16,9 @@
 
 package com.huaweicloud.sermant.router.config.handler;
 
-import com.huaweicloud.sermant.core.plugin.subscribe.processor.OrderConfigEvent;
 import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent;
 import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEventType;
+import com.huaweicloud.sermant.core.utils.StringUtils;
 import com.huaweicloud.sermant.router.common.constants.RouterConstant;
 import com.huaweicloud.sermant.router.common.utils.CollectionUtils;
 import com.huaweicloud.sermant.router.config.cache.ConfigCache;
@@ -30,10 +30,8 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Map.Entry;
 
 /**
  * 路由配置处理器（服务维度）
@@ -79,23 +77,11 @@ public class ServiceConfigHandler extends AbstractConfigHandler {
     }
 
     private List<Map<String, Object>> getRule(DynamicConfigEvent event, String serviceName) {
-        if (event instanceof OrderConfigEvent) {
-            Map<String, Object> allData = ((OrderConfigEvent) event).getAllData();
-            Map<String, List<Map<String, Object>>> routeRuleMap = new HashMap<>();
-            for (Entry<String, Object> entry : allData.entrySet()) {
-                String key = entry.getKey();
-                if (!key.startsWith(RouterConstant.ROUTER_KEY_PREFIX + POINT)) {
-                    continue;
-                }
-                Object value = entry.getValue();
-                if (value instanceof String) {
-                    routeRuleMap.put(entry.getKey(), yaml.loadAs((String) value, List.class));
-                } else {
-                    routeRuleMap.put(entry.getKey(), (List<Map<String, Object>>) value);
-                }
-            }
-            return routeRuleMap.get(RouterConstant.ROUTER_KEY_PREFIX + POINT + serviceName);
+        String content = event.getContent();
+        if (StringUtils.isBlank(content)) {
+            return Collections.emptyList();
         }
-        return yaml.loadAs(event.getContent(), List.class);
+        Map<String, List<Map<String, Object>>> map = yaml.load(content);
+        return map.get(RouterConstant.ROUTER_KEY_PREFIX + POINT + serviceName);
     }
 }
\\ No newline at end of file
diff --git a/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/java/com/huawei/dubbo/registry/listener/GovernanceConfigListener.java b/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/java/com/huawei/dubbo/registry/listener/GovernanceConfigListener.java
index 0816b965..3d07b3af 100644
--- a/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/java/com/huawei/dubbo/registry/listener/GovernanceConfigListener.java
+++ b/sermant-plugins/sermant-service-registry/dubbo-registry-service/src/main/java/com/huawei/dubbo/registry/listener/GovernanceConfigListener.java
@@ -20,11 +20,11 @@ import com.huawei.dubbo.registry.entity.GovernanceCache;
 import com.huawei.dubbo.registry.entity.GovernanceData;
 import com.huawei.dubbo.registry.service.RegistryService;
 
-import com.huaweicloud.sermant.core.plugin.subscribe.processor.OrderConfigEvent;
 import com.huaweicloud.sermant.core.service.ServiceManager;
 import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent;
 import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEventType;
 import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigListener;
+import com.huaweicloud.sermant.core.utils.StringUtils;
 
 import com.alibaba.fastjson.JSONObject;
 
@@ -54,8 +54,8 @@ public class GovernanceConfigListener implements DynamicConfigListener {
         GovernanceData governanceData = null;
         if (event.getEventType() != DynamicConfigEventType.DELETE) {
             String content = event.getContent();
-            if (event instanceof OrderConfigEvent) {
-                content = JSONObject.toJSONString(((OrderConfigEvent) event).getAllData());
+            if (StringUtils.isBlank(content)) {
+                return;
             }
             governanceData = JSONObject.parseObject(content, GovernanceData.class);
         }
diff --git a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/config/RegistryConfigResolver.java b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/config/RegistryConfigResolver.java
index 01a2dc01..59d00710 100644
--- a/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/config/RegistryConfigResolver.java
+++ b/sermant-plugins/sermant-service-registry/spring-cloud-registry-plugin/src/main/java/com/huawei/registry/config/RegistryConfigResolver.java
@@ -19,7 +19,6 @@ package com.huawei.registry.config;
 
 import com.huaweicloud.sermant.core.operation.OperationManager;
 import com.huaweicloud.sermant.core.operation.converter.api.YamlConverter;
-import com.huaweicloud.sermant.core.plugin.subscribe.processor.OrderConfigEvent;
 import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEvent;
 import com.huaweicloud.sermant.core.service.dynamicconfig.common.DynamicConfigEventType;
 import com.huaweicloud.sermant.core.utils.MapUtils;
@@ -50,14 +49,7 @@ public abstract class RegistryConfigResolver {
         if (!isTargetConfig(event)) {
             return;
         }
-        boolean isUpdated;
-        if (event instanceof OrderConfigEvent) {
-            final Map<String, Object> allData = ((OrderConfigEvent) event).getAllData();
-            isUpdated = updateConfig(allData, event.getEventType());
-        } else {
-            isUpdated = this.updateWithDefaultMode(event);
-        }
-        if (isUpdated) {
+        if (updateWithDefaultMode(event)) {
             afterUpdateConfig();
         }
     }