Skip to content

Allow easier use of custom RequestMappingHandlerMapping in WebMvcConfigurationSupport [SPR-12746] #17343

@spring-projects-issues

Description

@spring-projects-issues

Ryan Skow opened SPR-12746 and commented

The ability to customize RequestMappingHandlerMapping by overriding protected methods was added in #12468. However, WebMvcConfigurationSupport instantiates its own RequestMappingHandlerMapping and configures it with default settings all in a single method. This makes it hard to extend WebMvcConfigurationSupport to make it return an extension of RequestMappingHandlerMapping without copying and pasting a substantial chunk of code (in the requestMappingHandlerMapping() method).

It would be simple to extract the addition of the default configuration to RequestMappingHandlerMapping to a separate method, allowing extenders to avoid this duplication of internal Spring logic. A pull request will follow this issue.


Affects: 4.1.5

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