Package org.springframework.web.bind.annotation

Examples of org.springframework.web.bind.annotation.RequestMapping


        }
      }
    } else {
      if (method.getReturnType().equals(Void.TYPE)) {

        RequestMapping methodAnnotation = AnnotationUtils.findAnnotation(method, RequestMapping.class);
        RequestMapping classAnnotation = AnnotationUtils.findAnnotation(clazz, RequestMapping.class);

        String path = null;
        if (hasValue(classAnnotation)) {
          path = classAnnotation.value()[0];
        }

        if (hasValue(methodAnnotation)) {
          String methodPath = methodAnnotation.value()[0];
          if (path != null) {
View Full Code Here


    return true;
  }

  private boolean isValidFormPostMethod(final Method method) {
    RequestMapping annotation = AnnotationUtils.findAnnotation(method, RequestMapping.class);
    if (annotation != null) {
      RequestMethod[] requestMethods = annotation.method();
      if (requestMethods != null && requestMethods.length > 0) {
        if (requestMethods[0].equals(RequestMethod.POST)) {
          return true;
        }
      }
View Full Code Here

      }
    }
    else {
      if (method.getReturnType().equals(Void.TYPE)) {

        RequestMapping methodAnnotation = AnnotationUtils.findAnnotation(method,
            RequestMapping.class);
        RequestMapping classAnnotation = AnnotationUtils.findAnnotation(clazz,
            RequestMapping.class);

        String path = null;
        if (hasValue(classAnnotation)) {
          path = classAnnotation.value()[0];
        }

        if (hasValue(methodAnnotation)) {
          String methodPath = methodAnnotation.value()[0];
          if (path != null) {
View Full Code Here

  private boolean isValidFormPostMethod(final Method method) {
    if (AnnotationUtils.findAnnotation(method.getDeclaringClass(), Controller.class) == null) {
      return false;
    }

    RequestMapping methodAnnotation = AnnotationUtils.findAnnotation(method, RequestMapping.class);

    if (methodAnnotation == null) {
      return false;
    }

    RequestMapping classAnnotation = AnnotationUtils.findAnnotation(method.getDeclaringClass(),
        RequestMapping.class);

    boolean hasValue = false;

    if (classAnnotation != null) {
      hasValue = (classAnnotation.value() != null && classAnnotation.value().length > 0);
    }

    if (!hasValue) {
      hasValue = (methodAnnotation.value() != null && methodAnnotation.value().length > 0);
    }
View Full Code Here

  private boolean isValidFormPostMethod(final Class<?> clazz, final Method method) {
    if (AnnotationUtils.findAnnotation(clazz, Controller.class) == null) {
      return false;
    }

    RequestMapping methodAnnotation = AnnotationUtils.findAnnotation(method, RequestMapping.class);

    if (methodAnnotation == null) {
      return false;
    }

    RequestMapping classAnnotation = AnnotationUtils.findAnnotation(clazz, RequestMapping.class);

    boolean hasValue = false;

    if (classAnnotation != null) {
      hasValue = (classAnnotation.value() != null && classAnnotation.value().length > 0);
    }

    if (!hasValue) {
      hasValue = (methodAnnotation.value() != null && methodAnnotation.value().length > 0);
    }
View Full Code Here

  public MethodInfo(final Class<?> clazz, final Method method) {

    this.method = method;

    RequestMapping methodAnnotation = AnnotationUtils.findAnnotation(method, RequestMapping.class);
    if (methodAnnotation != null) {

      RequestMapping classAnnotation = AnnotationUtils.findAnnotation(clazz, RequestMapping.class);

      String path = null;
      if (hasValue(classAnnotation)) {
        path = classAnnotation.value()[0];
      }

      if (hasValue(methodAnnotation)) {
        String methodPath = methodAnnotation.value()[0];
        if (path != null) {
View Full Code Here

  private boolean isValidFormPostMethod(final Method method) {
    if (AnnotationUtils.findAnnotation(method.getDeclaringClass(), Controller.class) == null) {
      return false;
    }
   
    RequestMapping methodAnnotation = AnnotationUtils.findAnnotation(method, RequestMapping.class);

    if (methodAnnotation == null) {
      return false;
    }
   
    RequestMapping classAnnotation = AnnotationUtils.findAnnotation(method.getDeclaringClass(), RequestMapping.class);
   
    boolean hasValue = false;
   
    if (classAnnotation != null) {
      hasValue = (classAnnotation.value() != null && classAnnotation.value().length > 0);
    }
   
    if (!hasValue) {
      hasValue = (methodAnnotation.value() != null && methodAnnotation.value().length > 0);
    }
View Full Code Here

  public MethodInfo(final Method method) {

    this.method = method;

    RequestMapping methodAnnotation = AnnotationUtils.findAnnotation(method, RequestMapping.class);
    if (methodAnnotation != null) {
     
      RequestMapping classAnnotation = AnnotationUtils.findAnnotation(method.getDeclaringClass(), RequestMapping.class);
     
      String path = null;
      if (hasValue(classAnnotation)) {
        path = classAnnotation.value()[0];
      }

      if (hasValue(methodAnnotation)) {
        String methodPath = methodAnnotation.value()[0];
        if (path != null) {
View Full Code Here

    return true;
  }

  private boolean isValidFormPostMethod(final Method method) {
    RequestMapping annotation = AnnotationUtils.findAnnotation(method, RequestMapping.class);
    if (annotation != null) {
      RequestMethod[] requestMethods = annotation.method();
      if (requestMethods != null && requestMethods.length > 0) {
        if (requestMethods[0].equals(RequestMethod.POST)) {
          return true;
        }
      }
View Full Code Here

  public MethodInfo(final Method method) {
    this.method = method;
    this.parameterTypes = method.getParameterTypes();
   
    RequestMapping requestMappingAnnotation = AnnotationUtils.findAnnotation(method, RequestMapping.class);
    if (requestMappingAnnotation != null && StringUtils.hasText(requestMappingAnnotation.value()[0])) {
      String path = requestMappingAnnotation.value()[0];
      if (path.charAt(0) == '/' && path.length() > 1) {
        path = path.substring(1, path.length());
      }
      this.forwardPath = "forward:" + path;
    }   
View Full Code Here

TOP

Related Classes of org.springframework.web.bind.annotation.RequestMapping

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.