Package org.springframework.web.servlet.handler

Examples of org.springframework.web.servlet.handler.SimpleUrlHandlerMapping


    sockJsService.setSockJsClientLibraryUrl("https://cdn.sockjs.org/sockjs-0.3.4.min.js");

    Map<String, Object> urlMap = new HashMap<String, Object>();
    urlMap.put("/websockets/**", new SockJsHttpRequestHandler(sockJsService, serverWebSocketHandler()));

    SimpleUrlHandlerMapping hm = new SimpleUrlHandlerMapping();
    hm.setOrder(-1);
    hm.setUrlMap(urlMap);

    return hm;
  }
View Full Code Here


    }
   
    Map<String, HttpRequestHandler> urlMap = new HashMap<String, HttpRequestHandler>();
    urlMap.put("/**", handler);

    SimpleUrlHandlerMapping handlerMapping = new SimpleUrlHandlerMapping();
    handlerMapping.setOrder(Integer.MAX_VALUE);
    handlerMapping.setUrlMap(urlMap);
    return handlerMapping;
  }
View Full Code Here

        requestHandler.setApplicationContext(applicationContext);
        urlMap.put(pathPattern, requestHandler);
      }
    }

    SimpleUrlHandlerMapping handlerMapping = new SimpleUrlHandlerMapping();
    handlerMapping.setOrder(order);
    handlerMapping.setUrlMap(urlMap);
    return handlerMapping;
  }
View Full Code Here

    Map<String, Object> urlMap = new LinkedHashMap<String, Object>();
    for (ViewControllerRegistration registration : registrations) {
      urlMap.put(registration.getUrlPath(), registration.getViewController());
    }
   
    SimpleUrlHandlerMapping handlerMapping = new SimpleUrlHandlerMapping();
    handlerMapping.setOrder(order);
    handlerMapping.setUrlMap(urlMap);
    return handlerMapping;
  }
View Full Code Here

    }
   
    Map<String, HttpRequestHandler> urlMap = new HashMap<String, HttpRequestHandler>();
    urlMap.put("/**", handler);

    SimpleUrlHandlerMapping handlerMapping = new SimpleUrlHandlerMapping();
    handlerMapping.setOrder(Integer.MAX_VALUE);
    handlerMapping.setUrlMap(urlMap);
    return handlerMapping;
  }
View Full Code Here

    assertNotNull(resourceHandler);
    assertTrue(resourceHandler instanceof JsfResourceRequestHandler);

    map = this.context.getBeansOfType(SimpleUrlHandlerMapping.class);
    assertEquals(1, map.values().size());
    SimpleUrlHandlerMapping handlerMapping = (SimpleUrlHandlerMapping) map.values().iterator().next();
    assertSame(resourceHandler, handlerMapping.getHandlerMap().get("/javax.faces.resource/**"));
    assertEquals(0, handlerMapping.getOrder());
  }
View Full Code Here

    urlMap.put("/javax.faces.resource/**", jsfResourceRequestHandler());
    if (isRichFacesPresent) {
      urlMap.put("/rfRes/**", jsfResourceRequestHandler());
    }

    SimpleUrlHandlerMapping handlerMapping = new SimpleUrlHandlerMapping();
    handlerMapping.setUrlMap(urlMap);
    handlerMapping.setOrder(0);
    return handlerMapping;
  }
View Full Code Here

        List<String> paths = e.getValue();
        putHandlersMappings(urlMap, handler, paths);
      }
    }

    SimpleUrlHandlerMapping hm = new SimpleUrlHandlerMapping();
    hm.setUrlMap(urlMap);
    hm.setOrder(1);
    return hm;
  }
View Full Code Here

   public <T> T convert(Object source, Class<T> targetType) {
      if (TYPE_TO_STRING_MAP == type)
      {
         if (source instanceof SimpleUrlHandlerMapping)
         {
            SimpleUrlHandlerMapping mapping = (SimpleUrlHandlerMapping) source;
            return (T) mapping.getUrlMap();
         }
        
        
      }
      throw ThrowableBoostUtils.createNotImplementedException(source.getClass().getName());
View Full Code Here

  }

  @Override
  public HandlerMapping resourceHandlerMapping ( )
  {
    SimpleUrlHandlerMapping handlerMapping = (SimpleUrlHandlerMapping) super.resourceHandlerMapping();
    handlerMapping.setInterceptors(getInterceptors());
    return handlerMapping;
  }
View Full Code Here

TOP

Related Classes of org.springframework.web.servlet.handler.SimpleUrlHandlerMapping

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.