+ * Returns a matcher that includes all {@link Endpoint actuator endpoints} and
+ * everything beneath them. It also includes the links endpoint which is present at
+ * the base path of the actuator endpoints. The
+ * {@link EndpointServerWebExchangeMatcher#excluding(Class...) excluding} method can
+ * be used to further remove specific endpoints if required. For example:
+ *
* EndpointRequest.toAnyEndpoint().excluding(ShutdownEndpoint.class)
*
* @return the configured {@link ServerWebExchangeMatcher}
@@ -83,8 +84,8 @@ public static EndpointServerWebExchangeMatcher toAnyEndpoint() {
}
/**
- * Returns a matcher that includes the specified {@link Endpoint actuator endpoints}.
- * For example:
+ * Returns a matcher that includes the specified {@link Endpoint actuator endpoints}
+ * everything beneath them. For example:
* EndpointRequest.to(ShutdownEndpoint.class, HealthEndpoint.class)
*
* @param endpoints the endpoints to include
@@ -95,8 +96,8 @@ public static EndpointServerWebExchangeMatcher to(Class>... endpoints) {
}
/**
- * Returns a matcher that includes the specified {@link Endpoint actuator endpoints}.
- * For example:
+ * Returns a matcher that includes the specified {@link Endpoint actuator endpoints}
+ * everything beneath them. For example:
* EndpointRequest.to("shutdown", "health")
*
* @param endpoints the endpoints to include
@@ -236,6 +237,13 @@ && getServerNamespace(applicationContext) == null
return (applicationContext != null) ? applicationContext.getParent() : null;
}
+ protected final @Nullable String getLinksPath(String basePath) {
+ if (StringUtils.hasText(basePath)) {
+ return basePath;
+ }
+ return (this.managementPortType == ManagementPortType.DIFFERENT) ? "/" : null;
+ }
+
protected final String toString(List