Package org.springframework.web.bind.annotation

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


        if (modeKeys.length == 0 || params.length == 0) {
          registerHandlerType = !detectHandlerMethods(handlerType, beanName, mapping);
        }
        if (registerHandlerType) {
          AbstractParameterMappingPredicate predicate = new TypeLevelMappingPredicate(
              params, mapping.headers(), mapping.method());
          for (String modeKey : modeKeys) {
            registerHandler(new PortletMode(modeKey), beanName, predicate);
          }
        }
      }
View Full Code Here


      if (mapping != null) {
        String[] patterns = mapping.value();
        RequestMethod[] methods = new RequestMethod[0];
        String[] params = new String[0];
        String[] headers = new String[0];
        if (!hasTypeLevelMapping() || !Arrays.equals(mapping.method(), getTypeLevelMapping().method())) {
          methods = mapping.method();
        }
        if (!hasTypeLevelMapping() || !Arrays.equals(mapping.params(), getTypeLevelMapping().params())) {
          params = mapping.params();
        }
View Full Code Here

        String[] patterns = mapping.value();
        RequestMethod[] methods = new RequestMethod[0];
        String[] params = new String[0];
        String[] headers = new String[0];
        if (!hasTypeLevelMapping() || !Arrays.equals(mapping.method(), getTypeLevelMapping().method())) {
          methods = mapping.method();
        }
        if (!hasTypeLevelMapping() || !Arrays.equals(mapping.params(), getTypeLevelMapping().params())) {
          params = mapping.params();
        }
        if (!hasTypeLevelMapping() || !Arrays.equals(mapping.headers(), getTypeLevelMapping().headers())) {
View Full Code Here

        }
      }
    }

    if (mapping != null) {
      if (mapping.method().length > 0 || mapping.params().length > 0) {
        throw new IllegalStateException("Only path value supported for RequestMapping annotation " +
            "at the type level - map HTTP method and/or parameters at the method level! " +
            "Offending type: " + handlerType);
      }
      final Set<String> urls = new LinkedHashSet<String>();
View Full Code Here

      String resolvedMethodName = null;
      for (Method handlerMethod : this.handlerMethods) {
        RequestMappingInfo mappingInfo = new RequestMappingInfo();
        RequestMapping mapping = AnnotationUtils.findAnnotation(handlerMethod, RequestMapping.class);
        mappingInfo.paths = mapping.value();
        mappingInfo.methods = mapping.method();
        mappingInfo.params = mapping.params();
        boolean match = false;
        if (mappingInfo.paths.length > 0) {
          for (String mappedPath : mappingInfo.paths) {
            if (isPathMatch(mappedPath, lookupPath)) {
View Full Code Here

      if (mapping != null) {
        String[] patterns = mapping.value();
        RequestMethod[] methods = new RequestMethod[0];
        String[] params = new String[0];
        String[] headers = new String[0];
        if (!hasTypeLevelMapping() || !Arrays.equals(mapping.method(), getTypeLevelMapping().method())) {
          methods = mapping.method();
        }
        if (!hasTypeLevelMapping() || !Arrays.equals(mapping.params(), getTypeLevelMapping().params())) {
          params = mapping.params();
        }
View Full Code Here

        String[] patterns = mapping.value();
        RequestMethod[] methods = new RequestMethod[0];
        String[] params = new String[0];
        String[] headers = new String[0];
        if (!hasTypeLevelMapping() || !Arrays.equals(mapping.method(), getTypeLevelMapping().method())) {
          methods = mapping.method();
        }
        if (!hasTypeLevelMapping() || !Arrays.equals(mapping.params(), getTypeLevelMapping().params())) {
          params = mapping.params();
        }
        if (!hasTypeLevelMapping() || !Arrays.equals(mapping.headers(), getTypeLevelMapping().headers())) {
View Full Code Here

      }
      if (eventMapping != null) {
        mappingInfo.initPhaseMapping(PortletRequest.EVENT_PHASE, eventMapping.value(), new String[0]);
      }
      if (requestMapping != null) {
        mappingInfo.initStandardMapping(requestMapping.value(), requestMapping.method(),
            requestMapping.params(), requestMapping.headers());
        if (mappingInfo.phase == null) {
          mappingInfo.phase = determineDefaultPhase(method);
        }
      }
View Full Code Here

            if (!innerMappingUrl.startsWith("/")) {
              innerMappingUrl = "/" + innerMappingUrl;
            }
            innerMappingUrl = "/" + bundleName + innerMappingUrl;

            RequestMethod[] requestMethods = requestMapping
                .method();
            // 如果方法为空,则映射所有的HTTP方法
            if (requestMethods == null
                || requestMethods.length == 0) {
              requestMethods = RequestMethod.values();
View Full Code Here

      String resolvedMethodName = null;
      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();
        }
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.