diff --git a/pkg/client/dubbo/dubbo.go b/pkg/client/dubbo/dubbo.go index 8356b93e2..69dc84400 100644 --- a/pkg/client/dubbo/dubbo.go +++ b/pkg/client/dubbo/dubbo.go @@ -164,7 +164,7 @@ func (dc *Client) Call(req *client.Request) (resp client.Response, err error) { // MappingParams param mapping to api. func (dc *Client) MappingParams(req *client.Request) ([]string, []interface{}, error) { r := req.API.Method.IntegrationRequest - values := []interface{}{} + var values []interface{} for _, mappingParam := range r.MappingParams { source, _, err := client.ParseMapSource(mappingParam.Name) if err != nil { diff --git a/sample/dubbogo/proxy/api_config.yaml b/sample/dubbogo/proxy/api_config.yaml index e3cb19aa4..782865d70 100644 --- a/sample/dubbogo/proxy/api_config.yaml +++ b/sample/dubbogo/proxy/api_config.yaml @@ -20,10 +20,11 @@ resources: requestType: dubbo mappingParams: - name: queryStrings.name - mapTo: 1 + mapTo: 0 applicationName: "UserProvider" interface: "com.ic.user.UserProvider" method: "GetUserByName" + paramTypes: [ "java.lang.String" ] group: "test" version: 1.0.0 clusterName: "test_dubbo"