Skip to content

Make it easier to customize or extend the HandlerAdapter for annotated methods [SPR-7792] #12448

@spring-projects-issues

Description

@spring-projects-issues

Mark Pollack opened SPR-7792 and commented

It is very difficult to override any behavior on AnnotationMethodHandlerAdapter with a subclass. This class should be more open to extension and automatic configuration in the namespace.

Avoiding the use of the namespace the registration of a custom AnnotationMethodHandlerAdapter is also complicated by the fact that other parts of the framework need to be configured when the HandlerAdapter changes. These are typically done by the namespace handler for mvc, but as one can't register a custom HandlerAdapter in the namespace, one has to duplicate that non obvious configuration.

See
https://github.com/SpringSource/spring-data-document/tree/master/spring-data-document-core/src/main/java/org/springframework/data/document/web

for cut-n-paste extension of AnnotationMethodHandlerAdapter that I had created and its registration is done in

https://github.com/SpringSource/spring-data-document-examples/tree/master/myrestaurants-analytics/src/main/java/com/springone/myrestaurants/config


Affects: 3.0 GA

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions