Skip to content

Custom AnnotatedParameterProcessor is replace DefaultAnnotatedArgumentsProcessors? #111

@liudaomanbu

Description

@liudaomanbu

version:1.4.5

I try to add a Custom AnnotatedParameterProcessor to solve the problem that feign use get method type to transfer Object param.
Then i found that IllegalStateException: Method has too many Body parameters occurred at startup.
This reason is SpringMvcContract construct

		List<AnnotatedParameterProcessor> processors;
		if (!annotatedParameterProcessors.isEmpty()) {
			processors = new ArrayList<>(annotatedParameterProcessors);
		}
		else {
			processors = getDefaultAnnotatedArgumentsProcessors();
		}
		this.annotatedArgumentProcessors = toAnnotatedArgumentProcessorMap(processors);

When Custom AnnotatedParameterProcessors exist,DefaultAnnotatedArgumentsProcessors is not obtained.

Generally speaking,for multiple objects that can exist in spring container,custom a object to spring container mean that add a custom object instead of replace default objects.

I think this is a bug?
Otherwise,how to keep the default setting and add a my AnnotatedParameterProcessor In this condition?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions