Package org.springframework.data.rest.core.annotation

Examples of org.springframework.data.rest.core.annotation.RestResource.path()


    RestResource annotation = AnnotationUtils.findAnnotation(method, RestResource.class);
    String resourceRel = resourceMapping.getRel();

    this.isExported = annotation != null ? annotation.exported() : true;
    this.rel = annotation == null || !StringUtils.hasText(annotation.rel()) ? method.getName() : annotation.rel();
    this.path = annotation == null || !StringUtils.hasText(annotation.path()) ? new Path(method.getName()) : new Path(
        annotation.path());
    this.method = method;
    this.parameterMetadata = discoverParameterMetadata(method, resourceRel.concat(".").concat(rel));

    List<Class<?>> parameterTypes = Arrays.asList(method.getParameterTypes());
View Full Code Here


    String resourceRel = resourceMapping.getRel();

    this.isExported = annotation != null ? annotation.exported() : true;
    this.rel = annotation == null || !StringUtils.hasText(annotation.rel()) ? method.getName() : annotation.rel();
    this.path = annotation == null || !StringUtils.hasText(annotation.path()) ? new Path(method.getName()) : new Path(
        annotation.path());
    this.method = method;
    this.parameterMetadata = discoverParameterMetadata(method, resourceRel.concat(".").concat(rel));

    List<Class<?>> parameterTypes = Arrays.asList(method.getParameterTypes());
View Full Code Here

  public static String findPath(Class<?> type) {

    RestResource anno = findAnnotation(type, RestResource.class);

    if (anno != null) {
      if (hasTextExceptSlash(anno.path())) {
        return removeLeadingSlash(anno.path());
      }
    }

    return uncapitalize(type.getSimpleName().replaceAll("Repository", ""));
View Full Code Here

    RestResource anno = findAnnotation(type, RestResource.class);

    if (anno != null) {
      if (hasTextExceptSlash(anno.path())) {
        return removeLeadingSlash(anno.path());
      }
    }

    return uncapitalize(type.getSimpleName().replaceAll("Repository", ""));
  }
View Full Code Here

  public static String findPath(Method method) {

    RestResource anno = findAnnotation(method, RestResource.class);

    if (anno != null) {
      if (hasTextExceptSlash(anno.path())) {
        return removeLeadingSlash(anno.path());
      }
    }

    return method.getName();
View Full Code Here

    RestResource anno = findAnnotation(method, RestResource.class);

    if (anno != null) {
      if (hasTextExceptSlash(anno.path())) {
        return removeLeadingSlash(anno.path());
      }
    }

    return method.getName();
  }
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.