|
|
|
@ -21,6 +21,7 @@ import java.util.Collections;
|
|
|
|
|
import java.util.LinkedHashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.Map.Entry;
|
|
|
|
|
|
|
|
|
|
import org.springframework.aop.support.AopUtils;
|
|
|
|
|
import org.springframework.beans.BeansException;
|
|
|
|
@ -92,11 +93,11 @@ public class RequestMappingEndpoint extends AbstractEndpoint<Map<String, Object>
|
|
|
|
|
Map<?, HandlerMethod> methods = applicationContext
|
|
|
|
|
.getBean(name, AbstractHandlerMethodMapping.class)
|
|
|
|
|
.getHandlerMethods();
|
|
|
|
|
for (Object key : methods.keySet()) {
|
|
|
|
|
for (Entry<?, HandlerMethod> method : methods.entrySet()) {
|
|
|
|
|
Map<String, String> map = new LinkedHashMap<String, String>();
|
|
|
|
|
map.put("bean", name);
|
|
|
|
|
map.put("method", methods.get(key).toString());
|
|
|
|
|
result.put(key.toString(), map);
|
|
|
|
|
map.put("method", method.getValue().toString());
|
|
|
|
|
result.put( method.getKey().toString(), map);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -107,11 +108,11 @@ public class RequestMappingEndpoint extends AbstractEndpoint<Map<String, Object>
|
|
|
|
|
if (applicationContext != null) {
|
|
|
|
|
Map<String, AbstractUrlHandlerMapping> mappings = applicationContext
|
|
|
|
|
.getBeansOfType(AbstractUrlHandlerMapping.class);
|
|
|
|
|
for (String name : mappings.keySet()) {
|
|
|
|
|
AbstractUrlHandlerMapping mapping = mappings.get(name);
|
|
|
|
|
Map<String, Object> handlers = getHandlerMap(mapping);
|
|
|
|
|
for (String key : handlers.keySet()) {
|
|
|
|
|
result.put(key, Collections.singletonMap("bean", name));
|
|
|
|
|
for (Entry<String, AbstractUrlHandlerMapping> mapping : mappings.entrySet()) {
|
|
|
|
|
Map<String, Object> handlers = getHandlerMap(mapping.getValue());
|
|
|
|
|
for (Entry<String, Object> handler : handlers.entrySet()) {
|
|
|
|
|
result.put(handler.getKey(),
|
|
|
|
|
Collections.singletonMap("bean", mapping.getKey()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|