Package org.springframework.web.bind.annotation

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


          required = cookieValue.required();
          defaultValue = parseDefaultValueAttribute(cookieValue.defaultValue());
          found++;
        }
        else if (PathVariable.class.isInstance(paramAnn)) {
          PathVariable pathVar = (PathVariable) paramAnn;
          pathVarName = pathVar.value();
          found++;
        }
        else if (ModelAttribute.class.isInstance(paramAnn)) {
          ModelAttribute attr = (ModelAttribute) paramAnn;
          attrName = attr.value();
View Full Code Here


        else if (ModelAttribute.class.isInstance(paramAnn)) {
          throw new IllegalStateException(
              "@ModelAttribute is not supported on @InitBinder methods: " + initBinderMethod);
        }
        else if (PathVariable.class.isInstance(paramAnn)) {
          PathVariable pathVar = (PathVariable) paramAnn;
          pathVarName = pathVar.value();
        }
      }

      if (paramName == null && pathVarName == null) {
        Object argValue = resolveCommonArgument(methodParam, webRequest);
View Full Code Here

          required = cookieValue.required();
          defaultValue = parseDefaultValueAttribute(cookieValue.defaultValue());
          annotationsFound++;
        }
        else if (PathVariable.class.isInstance(paramAnn)) {
          PathVariable pathVar = (PathVariable) paramAnn;
          pathVarName = pathVar.value();
          annotationsFound++;
        }
        else if (ModelAttribute.class.isInstance(paramAnn)) {
          ModelAttribute attr = (ModelAttribute) paramAnn;
          attrName = attr.value();
View Full Code Here

        else if (ModelAttribute.class.isInstance(paramAnn)) {
          throw new IllegalStateException(
              "@ModelAttribute is not supported on @InitBinder methods: " + initBinderMethod);
        }
        else if (PathVariable.class.isInstance(paramAnn)) {
          PathVariable pathVar = (PathVariable) paramAnn;
          pathVarName = pathVar.value();
        }
      }

      if (paramName == null && pathVarName == null) {
        Object argValue = resolveCommonArgument(methodParam, webRequest);
View Full Code Here

    Map<String, Object> model = new HashMap<String, Object>();
    for (int i = 0; i < this.handlerMethod.getParameterTypes().length; i++) {
      MethodParameter methodParameter = new MethodParameter(this.handlerMethod, i);
      if (!isIgnored(request, methodParameter)) {
        methodParameter.initParameterNameDiscovery(parameterNameDiscoverer);
        PathVariable pathVariable = methodParameter.getParameterAnnotation(PathVariable.class);
        RequestParam requestParam = methodParameter.getParameterAnnotation(RequestParam.class);
        if (pathVariable != null) {
          addToPathVariableModel(model, methodParameter, pathVariable, source);
        } else {
          addRequestParameterToModel(model, methodParameter, requestParam, source);
View Full Code Here

TOP

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

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.