Package org.springframework.web.servlet.resource

Examples of org.springframework.web.servlet.resource.ResourceUrlProvider


  protected void addResourceHandlers(ResourceHandlerRegistry registry) {
  }

  @Bean
  public ResourceUrlProvider mvcResourceUrlProvider() {
    ResourceUrlProvider urlProvider = new ResourceUrlProvider();
    UrlPathHelper pathHelper = getPathMatchConfigurer().getUrlPathHelper();
    if (pathHelper != null) {
      urlProvider.setUrlPathHelper(pathHelper);
    }
    PathMatcher pathMatcher = getPathMatchConfigurer().getPathMatcher();
    if (pathMatcher != null) {
      urlProvider.setPathMatcher(pathMatcher);
    }
    return urlProvider;
  }
View Full Code Here


    BeanNameUrlHandlerMapping beanNameMapping = appContext.getBean(BeanNameUrlHandlerMapping.class);
    assertNotNull(beanNameMapping);
    assertEquals(2, beanNameMapping.getOrder());

    ResourceUrlProvider urlProvider = appContext.getBean(ResourceUrlProvider.class);
    assertNotNull(urlProvider);

    MappedInterceptor mappedInterceptor = appContext.getBean(MappedInterceptor.class);
    assertNotNull(urlProvider);
    assertEquals(ResourceUrlProviderExposingInterceptor.class, mappedInterceptor.getInterceptor().getClass());
View Full Code Here

TOP

Related Classes of org.springframework.web.servlet.resource.ResourceUrlProvider

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.