use of org.springframework.boot.actuate.endpoint.web.WebEndpointHttpMethod in project spring-boot by spring-projects.
the class RequestPredicateFactory method getRequestPredicate.
WebOperationRequestPredicate getRequestPredicate(String rootPath, DiscoveredOperationMethod operationMethod) {
Method method = operationMethod.getMethod();
Parameter[] selectorParameters = Arrays.stream(method.getParameters()).filter(this::hasSelector).toArray(Parameter[]::new);
Parameter allRemainingPathSegmentsParameter = getAllRemainingPathSegmentsParameter(selectorParameters);
String path = getPath(rootPath, selectorParameters, allRemainingPathSegmentsParameter != null);
WebEndpointHttpMethod httpMethod = determineHttpMethod(operationMethod.getOperationType());
Collection<String> consumes = getConsumes(httpMethod, method);
Collection<String> produces = getProduces(operationMethod, method);
return new WebOperationRequestPredicate(path, httpMethod, consumes, produces);
}
Aggregations