Package org.springframework.web.bind.annotation

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


          ((ConfigurableApplicationContext) context).getBeanFactory() : context);
      GenericBeanFactoryAccessor bfa = new GenericBeanFactoryAccessor(bf);
      RequestMapping mapping = bfa.findAnnotationOnBean(beanName, RequestMapping.class);
      if (mapping != null) {
        String[] modeKeys = mapping.value();
        String[] params = mapping.params();
        boolean registerHandlerType = true;
        if (modeKeys.length == 0 || params.length == 0) {
          registerHandlerType = !detectHandlerMethods(handlerType, beanName, mapping);
        }
        if (registerHandlerType) {
View Full Code Here


            else {
              throw new IllegalStateException(
                  "No portlet mode mappings specified - neither at type nor method level");
            }
          }
          String[] params = mapping.params();
          if (typeMapping != null) {
            PortletAnnotationMappingUtils.validateModeMapping(modeKeys, typeMapping.value());
            params = StringUtils.mergeStringArrays(typeMapping.params(), params);
          }
          ParameterMappingPredicate predicate = new ParameterMappingPredicate(params);
View Full Code Here

        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;
        if (mappingInfo.paths.length > 0) {
          for (String mappedPath : mappingInfo.paths) {
View Full Code Here

        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;
        if (mappingInfo.paths.length > 0) {
          for (String mappedPath : mappingInfo.paths) {
            if (isPathMatch(mappedPath, lookupPath)) {
View Full Code Here

                        }
                    } else {
                        uri.append(requestMapping.value()[0]);
                    }

                    String[] params = requestMapping.params();

                    if (params != null && params.length > 0) {
                        uri.append("?");

                        for (int i = 0; i < params.length; i++) {
View Full Code Here

      Class<?> handlerType = context.getType(beanName);
      RequestMapping mapping = context.findAnnotationOnBean(beanName, RequestMapping.class);
      if (mapping != null) {
        // @RequestMapping found at type level
        String[] modeKeys = mapping.value();
        String[] params = mapping.params();
        boolean registerHandlerType = true;
        if (modeKeys.length == 0 || params.length == 0) {
          registerHandlerType = !detectHandlerMethods(handlerType, beanName, mapping);
        }
        if (registerHandlerType) {
View Full Code Here

              if (!PortletAnnotationMappingUtils.validateModeMapping(modeKeys, typeMapping.value())) {
                throw new IllegalStateException("Mode mappings conflict between method and type level: " +
                    Arrays.asList(modeKeys) + " versus " + Arrays.asList(typeMapping.value()));
              }
            }
            params = StringUtils.mergeStringArrays(params, requestMapping.params());
            if (predicate == null) {
              predicate = new MethodLevelMappingPredicate(params);
            }
          }
          if (predicate != null) {
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);
        }
      }
      if (mappingInfo.phase != null) {
View Full Code Here

        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())) {
          headers = mapping.headers();
        }
View Full Code Here

        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())) {
          headers = mapping.headers();
        }
        RequestMappingInfo mappingInfo = new RequestMappingInfo(patterns, methods, params, headers);
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.