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

spring-issuemaster opened this issue Dec 22, 2013 · 2 comments


Copy link

@spring-issuemaster spring-issuemaster 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:

  • #14796 Expose path-related request mapping settings in the MVC XML namespace ("duplicates")

1 votes, 3 watchers

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Dec 23, 2013

Rossen Stoyanchev commented

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

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster 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
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.