Package org.springframework.web.bind.annotation

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


          new PatternsRequestCondition(annotation.value(), getUrlPathHelper(), getPathMatcher(), true, true),
          new RequestMethodsRequestCondition(annotation.method()),
          new ParamsRequestCondition(annotation.params()),
          new HeadersRequestCondition(annotation.headers()),
          new ConsumesRequestCondition(annotation.consumes(), annotation.headers()),
          new ProducesRequestCondition(annotation.produces(), annotation.headers()), null);
      }
      else {
        return null;
      }
    }
View Full Code Here


    private List<String> getProduces(Method method, RequestMapping methodRequestMapping) {
        List<String> produces = Arrays.asList(methodRequestMapping.produces());
        if(produces.isEmpty()) {
            RequestMapping controllerRequestMapping = method.getDeclaringClass().getAnnotation(RequestMapping.class);
            if(controllerRequestMapping != null) {
                produces = Arrays.asList(controllerRequestMapping.produces());
            }
        }

        return produces;
    }
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.