handlerMethods 在5.3中已迁移至 RequestMappingHandlerMapping
In Spring Framework 5.3, the handlerMethods field has been moved from the DispatcherServlet class to the RequestMappingHandlerMapping class.
Here's an example code snippet showing where the handlerMethods field is declared in Spring Framework 5.3:
public class RequestMappingHandlerMapping extends AbstractHandlerMethodMapping<RequestMappingInfo> {
// ...
/**
* Map from request mapping information to handler method and bean.
*/
private final Map<RequestMappingInfo, HandlerMethod> handlerMethods = new LinkedHashMap<>();
// ...
}