Forráskód Böngészése

Merge branch 'master' of luofaqiang/esb into master

luofaqiang 8 éve
szülő
commit
eb10838c32

+ 7 - 2
hos-camel2/src/main/java/camel/gateway/processor/GatewayProcessor.java

@ -160,9 +160,14 @@ public class GatewayProcessor implements Processor {
                return "";
            }
            Map<String, String> methodMap = new HashMap<>();
            methodMap.put("0", "get");
            methodMap.put("1", "post");
            methodMap.put("2", "delete");
            methodMap.put("3", "put");
            JsonNode jsonNode = objectMapper.readValue(param, JsonNode.class);
            String host = appApi.getMicroServiceUri().split(",")[0];
            String endPoint = "restlet:http://" + host + appApi.getMethodName() + "restletMethods=" + appApi.getMethod();
            String url = appApi.getMicroServiceUri().split(",")[0];
            String endPoint = "restlet:" + url + appApi.getMethodName() + "restletMethods=" + methodMap.get(appApi.getMethod());
            final String[] body = {""};
            appApi.getParameters().forEach(p -> {
                String value = jsonNode.asText(p.getName());