类org.springframework.web.servlet.handler.AbstractHandlerMethodMapping源码实例Demo

下面列出了怎么用org.springframework.web.servlet.handler.AbstractHandlerMethodMapping的API类实例代码及写法,或者点击链接到github查看源代码。

private List<String> getAllRequestMappingInfo() {
    AbstractHandlerMethodMapping<RequestMappingInfo> objHandlerMethodMapping = (AbstractHandlerMethodMapping<RequestMappingInfo>)applicationContext.getBean("requestMappingHandlerMapping");
    Map<RequestMappingInfo, HandlerMethod> mapRet = objHandlerMethodMapping.getHandlerMethods();
    List<String> res = new ArrayList<String>();
    for (Map.Entry<RequestMappingInfo, HandlerMethod> entry : mapRet.entrySet()) {
        String uri = entry.getKey().toString().replace("{", "").replace("[", "").replace("}","").replace("]","");
        String []temp = uri.split(",");
        res.add(temp[0]);
    }
    return res;
}
 
 类方法
 同包方法