Skip to content

UrlPathHelper in PathExtensionContentNegotiationStrategy should be configurable [SPR-14454] #19023

@spring-projects-issues

Description

@spring-projects-issues

Michael Feige opened SPR-14454 and commented

Hello,

I have a scenario, where I am required to change some behaviour of the UrlPathHelper. I was able to inject my Implementation via a BeanPostProcessor nearly everywhere I needed to. But then I figured that org.springframework.web.accept.PathExtensionContentNegotiationStrategy (which seems to be used when I map mvc-resources) holds a "private final static" Instance of the UrlPathHelper.

Would it be an option to make it an Instance-member?

I marked it as a bug, because there are multiple places (as when xml-configuring mvc:annotation-driven or websockets) where overriding the UrlPathHelper is encouraged. So I think it should be possible in general.

Regards,
Michael


Affects: 4.2.5

Referenced from: commits 5c3c0f7, 82ca201, 84afc60

Backported to: 4.2.8

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions