Search in sources :

Example 6 with Selector

use of org.springframework.boot.actuate.endpoint.annotation.Selector in project spring-boot by spring-projects.

the class RequestPredicateFactory method getAllRemainingPathSegmentsParameter.

private Parameter getAllRemainingPathSegmentsParameter(Parameter[] selectorParameters) {
    Parameter trailingPathsParameter = null;
    for (Parameter selectorParameter : selectorParameters) {
        Selector selector = selectorParameter.getAnnotation(Selector.class);
        if (selector.match() == Match.ALL_REMAINING) {
            Assert.state(trailingPathsParameter == null, "@Selector annotation with Match.ALL_REMAINING must be unique");
            trailingPathsParameter = selectorParameter;
        }
    }
    if (trailingPathsParameter != null) {
        Assert.state(trailingPathsParameter == selectorParameters[selectorParameters.length - 1], "@Selector annotation with Match.ALL_REMAINING must be the last parameter");
    }
    return trailingPathsParameter;
}
Also used : Parameter(java.lang.reflect.Parameter) Selector(org.springframework.boot.actuate.endpoint.annotation.Selector)

Aggregations

Selector (org.springframework.boot.actuate.endpoint.annotation.Selector)6 Operation (io.swagger.v3.oas.annotations.Operation)5 Parameter (io.swagger.v3.oas.annotations.Parameter)5 lombok.val (lombok.val)5 CasConfigurationProperties (org.apereo.cas.configuration.CasConfigurationProperties)5 BaseCasActuatorEndpoint (org.apereo.cas.web.BaseCasActuatorEndpoint)5 Endpoint (org.springframework.boot.actuate.endpoint.annotation.Endpoint)5 ReadOperation (org.springframework.boot.actuate.endpoint.annotation.ReadOperation)5 StringUtils (org.apache.commons.lang3.StringUtils)4 Map (java.util.Map)3 Collectors (java.util.stream.Collectors)3 MediaType (org.springframework.http.MediaType)3 ArrayList (java.util.ArrayList)2 Set (java.util.Set)2 WriteOperation (org.springframework.boot.actuate.endpoint.annotation.WriteOperation)2 Nullable (org.springframework.lang.Nullable)2 Parameter (java.lang.reflect.Parameter)1 LocalDate (java.time.LocalDate)1 ZoneId (java.time.ZoneId)1 Collection (java.util.Collection)1