Package org.springframework.web.bind.annotation

Examples of org.springframework.web.bind.annotation.RequestMapping.method()


      for (Method handlerMethod : getHandlerMethods()) {
        RequestMappingInfo mappingInfo = new RequestMappingInfo();
        RequestMapping mapping = AnnotationUtils.findAnnotation(handlerMethod, RequestMapping.class);
        mappingInfo.paths = mapping.value();
        if (!hasTypeLevelMapping() || !Arrays.equals(mapping.method(), getTypeLevelMapping().method())) {
          mappingInfo.methods = mapping.method();
        }
        if (!hasTypeLevelMapping() || !Arrays.equals(mapping.params(), getTypeLevelMapping().params())) {
          mappingInfo.params = mapping.params();
        }
        boolean match = false;
View Full Code Here


      }
      RequestMapping mapping = AnnotationUtils.findAnnotation(method, RequestMapping.class);
      if (mapping != null) {
        RequestMappingInfo mappingInfo = new RequestMappingInfo();
        mappingInfo.patterns = mapping.value();
        if (!hasTypeLevelMapping() || !Arrays.equals(mapping.method(), getTypeLevelMapping().method())) {
          mappingInfo.methods = mapping.method();
        }
        if (!hasTypeLevelMapping() || !Arrays.equals(mapping.params(), getTypeLevelMapping().params())) {
          mappingInfo.params = mapping.params();
        }
View Full Code Here

      RequestMapping mapping = AnnotationUtils.findAnnotation(method, RequestMapping.class);
      if (mapping != null) {
        RequestMappingInfo mappingInfo = new RequestMappingInfo();
        mappingInfo.patterns = mapping.value();
        if (!hasTypeLevelMapping() || !Arrays.equals(mapping.method(), getTypeLevelMapping().method())) {
          mappingInfo.methods = mapping.method();
        }
        if (!hasTypeLevelMapping() || !Arrays.equals(mapping.params(), getTypeLevelMapping().params())) {
          mappingInfo.params = mapping.params();
        }
        if (!hasTypeLevelMapping() || !Arrays.equals(mapping.headers(), getTypeLevelMapping().headers())) {
View Full Code Here

        }

        logger.debug("Analysing mappings for method:" + method.getName() + ", key:" + key
            + ", computed mappings: " + computedMappings);
        if (computedMappings.contains(key)) {
          RequestMethod[] methods = mapping.method();
          if (methods != null && methods.length > 0) {
            for (RequestMethod requestMethod : methods) {
              logger.debug("Added explicit mapping for path=" + key + "to RequestMethod=" + requestMethod);
              result.add(new ResourceInfo(key, requestMethod));
            }
View Full Code Here

            }
        }

        String httpMethod = "";
        RequestMapping methodRequestMapping = method.getAnnotation(RequestMapping.class);
        for (RequestMethod requestMethod : methodRequestMapping.method()) {
            httpMethod += requestMethod.name() + " ";
        }
        httpMethod = httpMethod.trim();
        if(StringUtils.isEmpty(httpMethod) || " ".equals(httpMethod)) {
            httpMethod = HttpMethod.GET.toString();
View Full Code Here

  }

  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

  }

  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

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.