Repository: huaweicloud/sermant
Issue: 【fix】fix the bug that springboot registry plugin can not process the url query params when method is post

### What happened?

when the method is post, and it's url has the url query params, plugin will not handler it. The result for it will lose the query params

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

N/A

### Anything else we need to know?

_No response_

### Sermant version

<details>
0.8.0
</details>


### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```
</details>


Changed files:
sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/java/com/huaweicloud/loadbalancer/interceptor/UrlInterceptor.java
sermant-plugins/sermant-springboot-registry/springboot-registry-plugin/src/main/java/com/huawei/discovery/utils/RequestInterceptorUtils.java
sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/java/com/huaweicloud/loadbalancer/declarer/UrlDeclarer.java

diff --git a/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/java/com/huaweicloud/loadbalancer/declarer/UrlDeclarer.java b/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/java/com/huaweicloud/loadbalancer/declarer/UrlDeclarer.java
index 20cb863a..6821721a 100644
--- a/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/java/com/huaweicloud/loadbalancer/declarer/UrlDeclarer.java
+++ b/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/java/com/huaweicloud/loadbalancer/declarer/UrlDeclarer.java
@@ -43,7 +43,8 @@ public class UrlDeclarer extends AbstractPluginDeclarer {
     @Override
     public InterceptDeclarer[] getInterceptDeclarers(ClassLoader classLoader) {
         return new InterceptDeclarer[]{
-            InterceptDeclarer.build(MethodMatcher.nameEquals(METHOD_NAME), INTERCEPT_CLASS)
+            InterceptDeclarer.build(MethodMatcher.nameEquals(METHOD_NAME)
+                    .and(MethodMatcher.paramTypesEqual("java.lang.String", "java.lang.String")), INTERCEPT_CLASS)
         };
     }
 }
diff --git a/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/java/com/huaweicloud/loadbalancer/interceptor/UrlInterceptor.java b/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/java/com/huaweicloud/loadbalancer/interceptor/UrlInterceptor.java
index 327662ab..7b059949 100644
--- a/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/java/com/huaweicloud/loadbalancer/interceptor/UrlInterceptor.java
+++ b/sermant-plugins/sermant-loadbalancer/dubbo-loadbalancer-plugin/src/main/java/com/huaweicloud/loadbalancer/interceptor/UrlInterceptor.java
@@ -67,10 +67,11 @@ public class UrlInterceptor extends AbstractInterceptor {
 
     @Override
     public ExecuteContext before(ExecuteContext context) {
-        LbContext.INSTANCE.setCurLoadbalancerType(LbContext.LOADBALANCER_DUBBO);
         Object[] arguments = context.getArguments();
         if (arguments != null && arguments.length > 1
                 && DubboUrlParamsConstants.DUBBO_LOAD_BALANCER_KEY.equals(arguments[1])) {
+            LbContext.INSTANCE.setCurLoadbalancerType(LbContext.LOADBALANCER_DUBBO);
+
             // 如果为empty，继续执行原方法，即使用宿主的负载均衡策略
             // 如果不为empty，则使用返回的type并跳过原方法
             checkRules();
diff --git a/sermant-plugins/sermant-springboot-registry/springboot-registry-plugin/src/main/java/com/huawei/discovery/utils/RequestInterceptorUtils.java b/sermant-plugins/sermant-springboot-registry/springboot-registry-plugin/src/main/java/com/huawei/discovery/utils/RequestInterceptorUtils.java
index 7dd73d7e..3efa99ef 100644
--- a/sermant-plugins/sermant-springboot-registry/springboot-registry-plugin/src/main/java/com/huawei/discovery/utils/RequestInterceptorUtils.java
+++ b/sermant-plugins/sermant-springboot-registry/springboot-registry-plugin/src/main/java/com/huawei/discovery/utils/RequestInterceptorUtils.java
@@ -308,9 +308,8 @@ public class RequestInterceptorUtils {
             .append(HttpConstants.HTTP_URL_COLON)
             .append(serviceInstance.getPort())
             .append(path);
-        if (uri.getRawQuery() != null && method.equals(HttpConstants.HTTP_GET)) {
-            urlBuild.append(HttpConstants.HTTP_URL_UNKNOWN)
-                .append(uri.getRawQuery());
+        if (uri.getRawQuery() != null) {
+            urlBuild.append(HttpConstants.HTTP_URL_UNKNOWN).append(uri.getRawQuery());
         }
         return urlBuild.toString();
     }