Examples of PathVariable


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

    if (Map.class.isAssignableFrom(parameter.getParameterType())) {
      return;
    }

    PathVariable ann = parameter.getParameterAnnotation(PathVariable.class);
    String name = (ann == null || StringUtils.isEmpty(ann.value()) ? parameter.getParameterName() : ann.value());
    value = formatUriValue(conversionService, new TypeDescriptor(parameter), value);
    uriVariables.put(name, value);
  }
View Full Code Here

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

          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

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

        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

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

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

        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

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

          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

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

        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

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

    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
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.