Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuring RequestMappingHandlerMapping in mvc:annotation-driven [SPR-11253] #15878

Closed
spring-projects-issues opened this issue Dec 22, 2013 · 2 comments
Assignees
Labels
in: web type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Dec 22, 2013

Baptiste Meurant opened SPR-11253 and commented

Since 3.2M2 and content negotiation improvements (cf. #13057), Spring allows to configure a ContentNegotiationManager on mvc:annotation-driven declaration :

<mvc:annotation-driven content-negotiation-manager="contentNegotiationManager"/>

This is really useful to define a custom list of media types that Spring will recognize. Thank you for that.

But if we want to exclude from suffix pattern recognition any other media type extension, we have also to set to true the useRegisteredSuffixPatternMatch property of the RequestMappingHandlerMapping (see this comment).

Unfortunately, as far I know, there is no way to configure the RequestMappingHandlerMapping from mvc-annotation-driven and we have to override the entire mvc-annotation-driven configuration which is boring, verbose and unuseful.

Why do not provide a comparable way to configure RequestMappingHandlerMapping ? Is there a strong technical or conceptual reason ?

Could we write something like :

<mvc:annotation-driven content-negotiation-manager="contentNegotiationManager" request-mapping-handler="requestmappingHandler"/>

Affects: 3.2.6

Issue Links:

1 votes, 3 watchers

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Dec 23, 2013

Rossen Stoyanchev commented

It should be possible. In fact we have a ticket along those lines (see #14796).

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Dec 23, 2013

Rossen Stoyanchev commented

I'm resolving this as duplicate. Please follow #14796.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants