Browse Source

Define custom AnnotatedParameterProcessors while keeping defaults, Fixes gh-111 (#268)

pull/281/head
matt62king 5 years ago committed by Spencer Gibb
parent
commit
01d05227c8
  1. 10
      spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/support/SpringMvcContract.java

10
spring-cloud-openfeign-core/src/main/java/org/springframework/cloud/openfeign/support/SpringMvcContract.java

@ -111,13 +111,9 @@ public class SpringMvcContract extends Contract.BaseContract @@ -111,13 +111,9 @@ public class SpringMvcContract extends Contract.BaseContract
"Parameter processors can not be null.");
Assert.notNull(conversionService, "ConversionService can not be null.");
List<AnnotatedParameterProcessor> processors;
if (!annotatedParameterProcessors.isEmpty()) {
processors = new ArrayList<>(annotatedParameterProcessors);
}
else {
processors = getDefaultAnnotatedArgumentsProcessors();
}
List<AnnotatedParameterProcessor> processors = getDefaultAnnotatedArgumentsProcessors();
processors.addAll(annotatedParameterProcessors);
this.annotatedArgumentProcessors = toAnnotatedArgumentProcessorMap(processors);
this.conversionService = conversionService;
this.convertingExpanderFactory = new ConvertingExpanderFactory(conversionService);

Loading…
Cancel
Save