@Autowired
WebApplicationContext applicationContext;
@RequestMapping(value= "/getAllURL", method =RequestMethod.POST)publicObject getAllURL() {
List> resultList = new ArrayList<>();
RequestMappingHandlerMapping requestMappingHandlerMapping= applicationContext.getBean(RequestMappingHandlerMapping.class);//获取url与类和方法的对应信息
Map map =requestMappingHandlerMapping.getHandlerMethods();for (Map.EntrymappingInfoHandlerMethodEntry : map.entrySet()) {
Map resultMap = new LinkedHashMap<>();
RequestMappingInfo requestMappingInfo=mappingInfoHandlerMethodEntry.getKey();
HandlerMethod handlerMethod=mappingInfoHandlerMethodEntry.getValue();
resultMap.put("className",handlerMethod.getMethod().getDeclaringClass().getName()); //类名
Annotation[] parentAnnotations =handlerMethod.getBeanType().getA