Examples of useTrailingSlashMatch()


Examples of org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.useTrailingSlashMatch()

  public void testPathMatchingConfiguration() {
    loadBeanDefinitions("mvc-config-path-matching.xml");
    RequestMappingHandlerMapping hm = appContext.getBean(RequestMappingHandlerMapping.class);
    assertNotNull(hm);
    assertTrue(hm.useSuffixPatternMatch());
    assertFalse(hm.useTrailingSlashMatch());
    assertTrue(hm.useRegisteredSuffixPatternMatch());
    assertThat(hm.getUrlPathHelper(), Matchers.instanceOf(TestPathHelper.class));
    assertThat(hm.getPathMatcher(), Matchers.instanceOf(TestPathMatcher.class));
    List<String> fileExtensions = hm.getContentNegotiationManager().getAllFileExtensions();
    assertThat(fileExtensions, Matchers.contains("xml"));
View Full Code Here

Examples of org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.useTrailingSlashMatch()

    assertEquals("PathMatchConfigurer should configure RegisteredSuffixPatternMatch",
        true, handlerMapping.useRegisteredSuffixPatternMatch());
    assertEquals("PathMatchConfigurer should configure SuffixPatternMatch",
        true, handlerMapping.useSuffixPatternMatch());
    assertEquals("PathMatchConfigurer should configure TrailingSlashMatch",
        false, handlerMapping.useTrailingSlashMatch());
    assertEquals("PathMatchConfigurer should configure UrlPathHelper",
        pathHelper, handlerMapping.getUrlPathHelper());
    assertEquals("PathMatchConfigurer should configure PathMatcher",
        pathMatcher, handlerMapping.getPathMatcher());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.