|
|
@ -165,13 +165,12 @@ public class GatewayMvcPropertiesBeanDefinitionRegistrar implements ImportBeanDe |
|
|
|
private <T> void translate(MultiValueMap<String, OperationMethod> operations, String operationName, |
|
|
|
private <T> void translate(MultiValueMap<String, OperationMethod> operations, String operationName, |
|
|
|
Map<String, String> operationArgs, Class<T> returnType, Consumer<T> operationHandler) { |
|
|
|
Map<String, String> operationArgs, Class<T> returnType, Consumer<T> operationHandler) { |
|
|
|
String normalizedName = StringUtils.uncapitalize(operationName); |
|
|
|
String normalizedName = StringUtils.uncapitalize(operationName); |
|
|
|
Optional<OperationMethod> filterOperationMethod = operations.get(normalizedName).stream() |
|
|
|
Optional<OperationMethod> operationMethod = operations.get(normalizedName).stream() |
|
|
|
.filter(operationMethod -> matchOperation(operationMethod, operationArgs)).findFirst(); |
|
|
|
.filter(opeMethod -> matchOperation(opeMethod, operationArgs)).findFirst(); |
|
|
|
if (filterOperationMethod.isPresent()) { |
|
|
|
if (operationMethod.isPresent()) { |
|
|
|
ReflectiveOperationInvoker operationInvoker = new ReflectiveOperationInvoker(filterOperationMethod.get(), |
|
|
|
ReflectiveOperationInvoker operationInvoker = new ReflectiveOperationInvoker(operationMethod.get(), |
|
|
|
this.parameterValueMapper); |
|
|
|
this.parameterValueMapper); |
|
|
|
Map<String, Object> args = new HashMap<>(); |
|
|
|
Map<String, Object> args = new HashMap<>(operationArgs); |
|
|
|
args.putAll(operationArgs); |
|
|
|
|
|
|
|
InvocationContext context = new InvocationContext(args, trueNullOperationArgumentResolver); |
|
|
|
InvocationContext context = new InvocationContext(args, trueNullOperationArgumentResolver); |
|
|
|
T handlerFilterFunction = operationInvoker.invoke(context); |
|
|
|
T handlerFilterFunction = operationInvoker.invoke(context); |
|
|
|
if (handlerFilterFunction != null) { |
|
|
|
if (handlerFilterFunction != null) { |
|
|
|