摘要: @RequestMapping注解对应的条件匹配实现解读. 基础实现类分别实现content Type,请求头,request parameter,value(url),http method的匹配规则. 使用CompositeRequestCondition,RequestMappingInfo,RequestConditionHolder进行封装使用 阅读全文
posted @ 2016-02-23 18:44 出门向左 阅读(13143) 评论(1) 推荐(4)
摘要: AbstractHandlerMethodMapping实现接口getHandlerInternal,定义查找流程 RequestMappingInfoHandlerMapping根据RequestMappingInfo,细化匹配条件,并在匹配不到情况下,顽强的使用RequestCondition一再尝试匹配 虽然 RequestMappingHandlerMapping是受益方,但在这边什么都没做(就是在初始化时,根据@Controller,@RequestMapping注解生成RequestMappingInfo;并根据这两个注解判断是否目标Handler 实现isHandler) 阅读全文
posted @ 2016-02-23 14:45 出门向左 阅读(4407) 评论(0) 推荐(1)
摘要: 初始化时,3个类的大致分工如下:   AbstractHandlerMethodMapping定义整个算法流程;   RequestMappingInfoHandlerMapping提供匹配条件RequestMappingInfo的解析处理;   RequestMappingHandlerMapping根据@RequestMapping注解生成 RequestMappingInfo,同时提供isHandler实现 阅读全文
posted @ 2016-02-23 11:22 出门向左 阅读(21799) 评论(0) 推荐(3)