Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why is DefaultAnnotationHandlerMapping deprecated?

In Spring MVC, class DefaultAnnotationHandlerMapping is deprecated. Documentation ( http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/servlet/mvc/annotation/DefaultAnnotationHandlerMapping.html ) says:

Deprecated. in Spring 3.2 in favor of RequestMappingHandlerMapping

Why is it deprecated? What practical problems of this class were fixed in RequestMappingHandlerMapping?

like image 290
user983447 Avatar asked May 27 '15 18:05

user983447


1 Answers

Spring Framework is an open-source project hosted on GitHub so all this information is easy to find in the code:

  1. Find the source file in question: click
  2. Switch to "blame" view: click
  3. Find all occurences of "@Deprecated" to find the associated commit: click
  4. Commit message mentions "SPR-10005", find it on Spring JIRA: click
  5. The JIRA ticket contains a link to the "what's new in version 3.1.3" document: click

The relevant part:

The new classes were developed in response to many requests to make annotation controller support classes more customizable and open for extension. Whereas previously you could configure a custom annotated controller method argument resolver, with the new support classes you can customize the processing for any supported method argument or return value type.

like image 123
kryger Avatar answered Nov 14 '22 15:11

kryger