gpt4 book ai didi

spring - 为什么 DefaultAnnotationHandlerMapping 被弃用?

转载 作者:行者123 更新时间:2023-12-02 06:25:37 26 4
gpt4 key购买 nike

在 Spring MVC 中,类 DefaultAnnotationHandlerMapping 已弃用。文档(http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/servlet/mvc/annotation/DefaultAnnotationHandlerMapping.html)说:

Deprecated. in Spring 3.2 in favor of RequestMappingHandlerMapping

为什么它被弃用了? RequestMappingHandlerMapping 修复了该类的哪些实际问题?

最佳答案

Spring Framework 是一个托管在 GitHub 上的开源项目,因此所有这些信息都很容易在代码中找到:

  1. 找到有问题的源文件:click
  2. 切换到“责备” View :click
  3. 查找所有出现的“@Deprecated”以查找关联的提交:click
  4. 提交消息提到“SPR-10005”,在 Spring JIRA 上找到它:click
  5. JIRA 票证包含指向“版本 3.1.3 中的新增功能”文档的链接:click

相关部分:

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.

关于spring - 为什么 DefaultAnnotationHandlerMapping 被弃用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30490213/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com