protected void extractHandlerMappings(
     Collection<AbstractUrlHandlerMapping> handlerMappings, Map<String, Object> result) {
   for (AbstractUrlHandlerMapping mapping : handlerMappings) {
     Map<String, Object> handlers = mapping.getHandlerMap();
     for (Map.Entry<String, Object> entry : handlers.entrySet()) {
       Class<? extends Object> handlerClass = entry.getValue().getClass();
       result.put(entry.getKey(), Collections.singletonMap("type", handlerClass.getName()));
     }
   }
 }
 private Map<String, Object> getHandlerMap(AbstractUrlHandlerMapping mapping) {
   if (AopUtils.isCglibProxy(mapping)) {
     // If the AbstractUrlHandlerMapping is a cglib proxy we can't call
     // the final getHandlerMap() method.
     return Collections.emptyMap();
   }
   return mapping.getHandlerMap();
 }