List of usage examples for org.springframework.web.servlet.mvc.condition RequestMethodsRequestCondition RequestMethodsRequestCondition
private RequestMethodsRequestCondition(Collection<RequestMethod> requestMethods)
From source file:com.iflytek.edu.cloud.frame.spring.rest.ServiceMethodHandlerMapping.java
protected ServiceMethodInfo createServiceMethodInfo(ServiceMethod annotation) { return new ServiceMethodInfo(new ServiceMethodRequestCondition(annotation.value(), annotation.version()), new RequestMethodsRequestCondition(annotation.method())); }
From source file:net.sf.cocmvc.ConventionalHandlerMapping.java
private RequestMappingInfo createRequestMapping(RequestMapping annotation, RequestCondition<?> customCondition) { return new RequestMappingInfo(createPatternRequestCondition(annotation.value()), new RequestMethodsRequestCondition(annotation.method()), new ParamsRequestCondition(annotation.params()), new HeadersRequestCondition(annotation.headers()), new ConsumesRequestCondition(annotation.consumes(), annotation.headers()), new ProducesRequestCondition(annotation.produces(), annotation.headers()), customCondition); }
From source file:org.makersoft.mvc.method.annotation.RESTfulMappingHandlerMapping.java
/** * Created a RequestMappingInfo from a RequestMapping annotation. */// w ww. j av a 2s . co m private RequestMappingInfo createRequestMappingInfo(Method method, RESTfull annotation, Class<?> controllerClass) { Mapping mapping = RESTfulHelper.matchMapping(method.getName()); if (mapping != null) { PackageBasedUrlPathBuilder builder = new PackageBasedUrlPathBuilder(packageLocators, controllerPackages, controllerSuffix, root); String[] namespaceString = builder.buildUrlPath(controllerClass, mapping.getMethodName(), mapping.getValues()); if (namespaceString != null) { return new RequestMappingInfo( new PatternsRequestCondition(namespaceString, getUrlPathHelper(), getPathMatcher(), this.useSuffixPatternMatch, this.useTrailingSlashMatch), new RequestMethodsRequestCondition(mapping.getRequestMethods()), new ParamsRequestCondition(mapping.getParams()), new HeadersRequestCondition(mapping.getHeaders()), new ConsumesRequestCondition(mapping.getConsumes(), mapping.getHeaders()), new ProducesRequestCondition(mapping.getProduces(), mapping.getHeaders()), getCustomMethodCondition(method)); } } return null; }