Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow configuring RequestMappingHandlerMapping in mvc:annotation-driven [SPR-11253] #15878
Since 3.2M2 and content negotiation improvements (cf. #13057), Spring allows to configure a ContentNegotiationManager on mvc:annotation-driven declaration :
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"/>
1 votes, 3 watchers