Package org.springframework.web.servlet.handler

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


     * @return
     */
    @Bean
    public HandlerMapping defaultServletHandlerMapping(ServletContext servletContext) {
        LocalConfigurer configurer = new LocalConfigurer(servletContext);
        AbstractHandlerMapping handlerMapping = configurer.getHandlerMapping();
        handlerMapping = handlerMapping != null ? handlerMapping : new AbstractHandlerMapping(){
            @Override
            protected Object getHandlerInternal(HttpServletRequest request) throws Exception { return null; }
        };
        return handlerMapping;
    }
View Full Code Here


  @Bean
  public HandlerMapping viewControllerHandlerMapping() {
    ViewControllerRegistry registry = new ViewControllerRegistry();
    addViewControllers(registry);
   
    AbstractHandlerMapping handlerMapping = registry.getHandlerMapping();
    handlerMapping = handlerMapping != null ? handlerMapping : new EmptyHandlerMapping();
    handlerMapping.setInterceptors(getInterceptors());
    return handlerMapping;
  }
View Full Code Here

   */
  @Bean
  public HandlerMapping resourceHandlerMapping() {
    ResourceHandlerRegistry registry = new ResourceHandlerRegistry(applicationContext, servletContext);
    addResourceHandlers(registry);
    AbstractHandlerMapping handlerMapping = registry.getHandlerMapping();
    handlerMapping = handlerMapping != null ? handlerMapping : new EmptyHandlerMapping();
    return handlerMapping;
  }
View Full Code Here

   */
  @Bean
  public HandlerMapping defaultServletHandlerMapping() {
    DefaultServletHandlerConfigurer configurer = new DefaultServletHandlerConfigurer(servletContext);
    configureDefaultServletHandling(configurer);
    AbstractHandlerMapping handlerMapping = configurer.getHandlerMapping();
    handlerMapping = handlerMapping != null ? handlerMapping : new EmptyHandlerMapping();
    return handlerMapping;
  }
View Full Code Here

  @Bean
  public HandlerMapping viewControllerHandlerMapping() {
    ViewControllerRegistry registry = new ViewControllerRegistry();
    addViewControllers(registry);

    AbstractHandlerMapping handlerMapping = registry.getHandlerMapping();
    handlerMapping = handlerMapping != null ? handlerMapping : new EmptyHandlerMapping();
    handlerMapping.setInterceptors(getInterceptors());
    return handlerMapping;
  }
View Full Code Here

   */
  @Bean
  public HandlerMapping resourceHandlerMapping() {
    ResourceHandlerRegistry registry = new ResourceHandlerRegistry(applicationContext, servletContext);
    addResourceHandlers(registry);
    AbstractHandlerMapping handlerMapping = registry.getHandlerMapping();
    handlerMapping = handlerMapping != null ? handlerMapping : new EmptyHandlerMapping();
    return handlerMapping;
  }
View Full Code Here

   */
  @Bean
  public HandlerMapping defaultServletHandlerMapping() {
    DefaultServletHandlerConfigurer configurer = new DefaultServletHandlerConfigurer(servletContext);
    configureDefaultServletHandling(configurer);
    AbstractHandlerMapping handlerMapping = configurer.getHandlerMapping();
    handlerMapping = handlerMapping != null ? handlerMapping : new EmptyHandlerMapping();
    return handlerMapping;
  }
View Full Code Here

  @Bean
  public HandlerMapping viewControllerHandlerMapping() {
    ViewControllerRegistry registry = new ViewControllerRegistry();
    addViewControllers(registry);

    AbstractHandlerMapping handlerMapping = registry.getHandlerMapping();
    handlerMapping = (handlerMapping != null ? handlerMapping : new EmptyHandlerMapping());
    handlerMapping.setPathMatcher(mvcPathMatcher());
    handlerMapping.setUrlPathHelper(mvcUrlPathHelper());
    handlerMapping.setInterceptors(getInterceptors());
    return handlerMapping;
  }
View Full Code Here

  @Bean
  public HandlerMapping resourceHandlerMapping() {
    ResourceHandlerRegistry registry = new ResourceHandlerRegistry(this.applicationContext, this.servletContext);
    addResourceHandlers(registry);

    AbstractHandlerMapping handlerMapping = registry.getHandlerMapping();
    if (handlerMapping != null) {
      handlerMapping.setPathMatcher(mvcPathMatcher());
      handlerMapping.setUrlPathHelper(mvcUrlPathHelper());
      handlerMapping.setInterceptors(new HandlerInterceptor[] {
          new ResourceUrlProviderExposingInterceptor(mvcResourceUrlProvider())});
    }
    else {
      handlerMapping = new EmptyHandlerMapping();
    }
View Full Code Here

   */
  @Bean
  public HandlerMapping defaultServletHandlerMapping() {
    DefaultServletHandlerConfigurer configurer = new DefaultServletHandlerConfigurer(servletContext);
    configureDefaultServletHandling(configurer);
    AbstractHandlerMapping handlerMapping = configurer.getHandlerMapping();
    handlerMapping = handlerMapping != null ? handlerMapping : new EmptyHandlerMapping();
    return handlerMapping;
  }
View Full Code Here

TOP

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

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.