-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Description
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:
- Expose path-related request mapping settings in the MVC XML namespace [SPR-10163] #14796 Expose path-related request mapping settings in the MVC XML namespace ("duplicates")
1 votes, 3 watchers