类的使用
org.springframework.web.servlet.mvc.condition.RequestMethodsRequestCondition
使用RequestMethodsRequestCondition的程序包 程序包 说明 org.springframework.web.servlet.mvc.condition Common MVC logic for matching incoming requests based on conditions.org.springframework.web.servlet.mvc.method Servlet-based infrastructure for handler method processing, building on theorg.springframework.web.methodpackage.org.springframework.web.servlet.mvc.condition中RequestMethodsRequestCondition的使用
返回RequestMethodsRequestCondition的org.springframework.web.servlet.mvc.condition中的方法 修饰符和类型 方法 说明 RequestMethodsRequestConditionRequestMethodsRequestCondition. combine(RequestMethodsRequestCondition other)Returns a new instance with a union of the HTTP request methods from "this" and the "other" instance.RequestMethodsRequestConditionRequestMethodsRequestCondition. getMatchingCondition(HttpServletRequest request)Check if any of the HTTP request methods match the given request and return an instance that contains the matching HTTP request method only.参数类型为RequestMethodsRequestCondition的org.springframework.web.servlet.mvc.condition中的方法 修饰符和类型 方法 说明 RequestMethodsRequestConditionRequestMethodsRequestCondition. combine(RequestMethodsRequestCondition other)Returns a new instance with a union of the HTTP request methods from "this" and the "other" instance.intRequestMethodsRequestCondition. compareTo(RequestMethodsRequestCondition other, HttpServletRequest request)Returns: 0 if the two conditions contain the same number of HTTP request methods Less than 0 if "this" instance has an HTTP request method but "other" doesn't Greater than 0 "other" has an HTTP request method but "this" doesn'torg.springframework.web.servlet.mvc.method中RequestMethodsRequestCondition的使用
返回RequestMethodsRequestCondition的org.springframework.web.servlet.mvc.method中的方法 修饰符和类型 方法 说明 RequestMethodsRequestConditionRequestMappingInfo. getMethodsCondition()Return the HTTP request methods of thisRequestMappingInfo; or instance with 0 request methods (nevernull).参数类型为RequestMethodsRequestCondition的org.springframework.web.servlet.mvc.method中的构造器 构造器 说明 RequestMappingInfo(String name, PatternsRequestCondition patterns, RequestMethodsRequestCondition methods, ParamsRequestCondition params, HeadersRequestCondition headers, ConsumesRequestCondition consumes, ProducesRequestCondition produces, RequestCondition<?> custom)RequestMappingInfo(PatternsRequestCondition patterns, RequestMethodsRequestCondition methods, ParamsRequestCondition params, HeadersRequestCondition headers, ConsumesRequestCondition consumes, ProducesRequestCondition produces, RequestCondition<?> custom)Creates a new instance with the given request conditions.