Class EndpointRequest
java.lang.Object
org.springframework.boot.actuate.autoconfigure.security.servlet.EndpointRequest
Factory that can be used to create a
RequestMatcher
for actuator endpoint
locations.- Since:
- 2.0.0
- Author:
- Madhura Bhave, Phillip Webb
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
The request matcher used to match againstactuator endpoints
.static final class
The request matcher used to match against the links endpoint. -
Method Summary
Modifier and TypeMethodDescriptionReturns a matcher that includes the specifiedactuator endpoints
.Returns a matcher that includes the specifiedactuator endpoints
.Returns a matcher that includes allactuator endpoints
.toLinks()
Returns a matcher that matches only on the links endpoint.
-
Method Details
-
toAnyEndpoint
Returns a matcher that includes allactuator endpoints
. It also includes the links endpoint which is present at the base path of the actuator endpoints. Theexcluding
method can be used to further remove specific endpoints if required. For example:EndpointRequest.toAnyEndpoint().excluding(ShutdownEndpoint.class)
- Returns:
- the configured
RequestMatcher
-
to
Returns a matcher that includes the specifiedactuator endpoints
. For example:EndpointRequest.to(ShutdownEndpoint.class, HealthEndpoint.class)
- Parameters:
endpoints
- the endpoints to include- Returns:
- the configured
RequestMatcher
-
to
Returns a matcher that includes the specifiedactuator endpoints
. For example:EndpointRequest.to("shutdown", "health")
- Parameters:
endpoints
- the endpoints to include- Returns:
- the configured
RequestMatcher
-
toLinks
Returns a matcher that matches only on the links endpoint. It can be used when security configuration for the links endpoint is different from the otheractuator endpoints
. TheexcludingLinks
method can be used in combination with this to remove the links endpoint fromtoAnyEndpoint
. For example:EndpointRequest.toLinks()
- Returns:
- the configured
RequestMatcher
-