Why is DefaultAnnotationHandlerMapping deprecated?
In Spring MVC, the DefaultAnnotationHandlerMapping class has been deprecated. Documentation ( http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/servlet/mvc/annotation/DefaultAnnotationHandlerMapping.html ):
Obsolete. in Spring 3.2 in favor of RequestMappingHandlerMapping
Why is it deprecated? What practical problems with this class have been captured in RequestMappingHandlerMapping?
source to share
Spring Framework is an open source project hosted on GitHub, so all this information is easy to find in the code:
- Find the source file: click
- Switch to "blame": click
- Find All Occurrences of "
@Deprecated
" To Find Associated Commit: Click - The error message mentions "SPR-10005", find it on Spring JIRA: click
- The JIRA ticket contains a link to the document "What's new in version 3.1.3": click
Relevant part:
The new classes have been developed in response to many requests to make the annotation controller support classes more customizable and extensible. Whereas previously you could configure a custom annotated controller's custom method argument argument, with the new support classes, you can customize the processing for any supported method argument or return type.
source to share