Package org.springframework.util

Examples of org.springframework.util.PathMatcher


    }
    if (typeLevelRequestMapping != null) {
      url += typeLevelRequestMapping.value()[0];
    }

    PathMatcher pathMatcher = this.context.getPathMatcher();
    if (pathMatcher == null) {
      pathMatcher = new AntPathMatcher();
    }
    url = pathMatcher.combine(url, methodRequestMapping.value()[0]);
    if (!url.startsWith("/")) {
      url = "/" + url;
    }
    return url;
  }
View Full Code Here


  @Test
  public void shouldSupportContextSetters() throws Exception {
    WebArgumentResolver webArgumentResolver = mock(WebArgumentResolver.class);
    WebArgumentResolver[] customArgumentResolvers = new WebArgumentResolver[] { webArgumentResolver };
    PathMatcher pathMatcher = mock(PathMatcher.class);
    WebBindingInitializer webBindingInitializer = mock(WebBindingInitializer.class);
    ParameterNameDiscoverer parameterNameDiscoverer = mock(ParameterNameDiscoverer.class);
    this.resolver.setCustomArgumentResolvers(customArgumentResolvers);
    this.resolver.setPathMatcher(pathMatcher);
    this.resolver.setWebBindingInitializer(webBindingInitializer);
View Full Code Here

      if (startsWithSlash) {
        pkg = FOLDER_SEPARATOR + pkg;
      }

      final PathMatcher matcher = getPathMatcher();
      // if the imported package matches the path
      if (matcher.matchStart(path, pkg)) {
        // start the JAR analysis
        Enumeration entries = importedBundle.getBundle().getEntryPaths(pkg);
        while (entries != null && entries.hasMoreElements()) {
          String entry = (String) entries.nextElement();
          if (startsWithSlash)
            entry = FOLDER_SEPARATOR + entry;

          if (matcher.match(path, entry)) {
            if (trace)
              logger.trace("Found entry [" + entry + "]");
            foundPaths.add(entry);
          }
        }
View Full Code Here

TOP

Related Classes of org.springframework.util.PathMatcher

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.