Spring Boot Admin 自定义端点检测Custom Endpoint Detection实战指南【免费下载链接】spring-boot-adminAdmin UI for administration of spring boot applications项目地址: https://gitcode.com/gh_mirrors/sp/spring-boot-admin当客户端实例向 Admin Server 注册后Admin Server 需要自动发现该实例暴露了哪些 Actuator 端点以便在管理界面中展示健康检查、指标、日志等视图。Spring Boot Admin 将这一过程抽象为可插拔的EndpointDetectionStrategy端点检测策略默认通过查询/actuator索引 回退探测的组合方式完成端点发现。本文基于当前仓库 04-endpoint-detection.md 文档结合spring-boot-admin-server模块源码系统讲解三种内置策略的工作原理、配置方式以及如何编写自定义策略覆盖元数据、数据库、HTTP 发现等复杂场景。读完本文你将能够根据自身集群的 Spring Boot 版本、Actuator 配置与自定义端点设计出正确、高效且可维护的端点检测方案。概述三种内置检测策略当客户端注册时Admin Server 会检测其可用的 Actuator 端点。检测逻辑由可定制的策略实现核心机制如下QueryIndexEndpointStrategy默认首选——向/actuator索引发起请求从返回的_links中读取端点链接ProbeEndpointsStrategy回退方案——对配置的端点逐个发送 HTTPOPTIONS请求进行探测ChainingStrategy组合器——按顺序组合多个策略前一个策略返回空结果时自动回退到下一个。三种策略的完整调用流程可表示为默认行为ChainingStrategy 组合策略在默认情况下Admin Server 使用ChainingStrategy组合以下两条路径首先尝试QueryIndexEndpointStrategy适用于 Spring Boot 2.x 及以上、提供/actuator索引的客户端若索引查询失败或返回空结果回退到ProbeEndpointsStrategy适用于 Spring Boot 1.x 或索引不可用的情况。该默认配置定义在 AdminServerAutoConfiguration.java 中Bean ConditionalOnMissingBean public EndpointDetectionStrategy endpointDetectionStrategy( InstanceWebClient instanceWebClient, AdminServerProperties adminServerProperties, ApiMediaTypeHandler apiMediaTypeHandler) { return new ChainingStrategy( new QueryIndexEndpointStrategy(instanceWebClient, apiMediaTypeHandler), new ProbeEndpointsStrategy(instanceWebClient, adminServerProperties.getProbedEndpoints()) ); }几点实现细节值得注意ConditionalOnMissingBean意味着只要你在自己的配置类中声明了EndpointDetectionStrategyBean默认策略就会被完整替换——这是自定义检测逻辑的官方扩展点两个策略共享同一个InstanceWebClient该客户端封装了对实例的 HTTP 访问能力含认证、超时等配置保证检测请求与 Admin Server 其他对实例的请求走同一套网络配置probedEndpoints来自AdminServerProperties对应配置项spring.boot.admin.probed-endpoints其源码默认值在 AdminServerProperties.java 中定义以health、env、metrics、httptrace:trace、httptrace、threaddump:dump等内置端点开头的列表。QueryIndexEndpointStrategy查询 Actuator 索引该策略向实例的managementUrl通常是/actuator发起GET请求从响应 JSON 的_links字段中解析端点是一种一次请求、全量发现的高效方案。工作原理请求GET /actuator HTTP/1.1 Accept: application/vnd.spring-boot.actuator.v3json响应{ _links: { self: { href: http://localhost:8080/actuator, templated: false }, health: { href: http://localhost:8080/actuator/health, templated: false }, info: { href: http://localhost:8080/actuator/info, templated: false }, metrics: { href: http://localhost:8080/actuator/metrics/{requiredMetricName}, templated: true } } }提取结果health→http://localhost:8080/actuator/healthinfo→http://localhost:8080/actuator/infometrics被排除因为templated: true属于带路径参数的模板链接源码级实现细节阅读 QueryIndexEndpointStrategy.java 可以确认以下关键逻辑前置校验若managementUrl为null或与serviceUrl完全相同说明未独立配置管理端口则直接跳过查询返回Mono.empty()响应校验仅当 HTTP 状态为 2xx、且响应Content-Type通过ApiMediaTypeHandler判定为 Actuator API 媒体类型如application/vnd.spring-boot.actuator.v3json时才会解析否则返回空结果交由链中下一个策略处理链接过滤在convertResponse方法中遍历_links的所有条目过滤掉键为self以及templatedtrue的条目剩余条目被映射为Endpoint.of(id, href)HTTPS 修正alignWithManagementUrl方法发现managementUrl使用https:而解析出的端点 URL 仍是http:时会自动将http:重写为https:并打印告警日志提示实例应配置server.forward-headers-strategynative以修正代理场景下的协议推断。只使用 QueryIndexEndpointStrategypackage com.example.admin; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import de.codecentric.boot.admin.server.services.ApiMediaTypeHandler; import de.codecentric.boot.admin.server.services.endpoints.EndpointDetectionStrategy; import de.codecentric.boot.admin.server.services.endpoints.QueryIndexEndpointStrategy; import de.codecentric.boot.admin.server.web.client.InstanceWebClient; Configuration public class EndpointDetectionConfig { Bean public EndpointDetectionStrategy endpointDetectionStrategy( InstanceWebClient instanceWebClient, ApiMediaTypeHandler apiMediaTypeHandler) { return new QueryIndexEndpointStrategy(instanceWebClient, apiMediaTypeHandler); } }适用场景所有客户端均为 Spring Boot 2.x 及以上版本所有客户端的/actuator索引均可用默认暴露希望获得最快的检测速度。ProbeEndpointsStrategyOPTIONS 逐个探测该策略针对配置列表中的每个端点发送OPTIONS请求只要返回 2xx 状态码即认为该端点可用。它不依赖 Actuator 索引因此可以兼容更老的 Spring Boot 版本也能发现任意自定义端点。工作原理对探测列表中的每个端点执行OPTIONS /actuator/health HTTP/1.1若响应为2xx则认为该端点可用。从 ProbeEndpointsStrategy.java 源码可以看到探测请求的 URL 由managementUrl拼接端点路径得到且使用了Flux.fromIterable(...).flatMap(...)对列表中的端点并发探测最后统一收集结果。此外源码中对重复端点 ID有去重保护若探测结果中多个不同路径映射到同一个端点 ID会保留探测列表中最靠前的那个并打印Duplicate endpoints for id ... detected. Omitting: ...的告警日志。配置 probed-endpointsapplication.ymlspring: boot: admin: probed-endpoints: - health - info - metrics - env - loggers - logfile - threaddump - heapdump自定义端点路径id:path 语法当端点的 ID 与它在 Actuator 下的实际路径不一致时可以使用id:path语法显式指定路径。源码中EndpointDefinition.create(String idWithPath)方法以第一个冒号为分隔符拆分为(id, path)例如spring: boot: admin: probed-endpoints: - health:ping # Endpoint ID health at path /actuator/ping - metrics:stats # Endpoint ID metrics at path /actuator/stats - custom:my-custom # Endpoint ID custom at path /actuator/my-custom只使用 ProbeEndpointsStrategypackage com.example.admin; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import de.codecentric.boot.admin.server.config.AdminServerProperties; import de.codecentric.boot.admin.server.services.endpoints.EndpointDetectionStrategy; import de.codecentric.boot.admin.server.services.endpoints.ProbeEndpointsStrategy; import de.codecentric.boot.admin.server.web.client.InstanceWebClient; Configuration public class EndpointDetectionConfig { Bean public EndpointDetectionStrategy endpointDetectionStrategy( InstanceWebClient instanceWebClient, AdminServerProperties properties) { return new ProbeEndpointsStrategy( instanceWebClient, properties.getProbedEndpoints() ); } }适用场景需要支持 Spring Boot 1.x 应用Actuator 索引被禁用或不可用需要探测特定的自定义端点。ChainingStrategy带回退的策略组合ChainingStrategy 按构造参数顺序依次尝试各个策略直到某个策略返回非空结果为止。其实现位于 ChainingStrategy.java核心逻辑是用Mono.switchIfEmpty将各策略串成响应式链路Override public MonoEndpoints detectEndpoints(Instance instance) { MonoEndpoints result Mono.empty(); for (EndpointDetectionStrategy delegate : delegates) { result result.switchIfEmpty(delegate.detectEndpoints(instance)); } return result.switchIfEmpty(Mono.just(Endpoints.empty())); }即前一个策略返回空Mono.empty()时自动尝试下一个若所有策略都返回空最终兜底返回Endpoints.empty()而非异常。自定义策略链package com.example.admin; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import de.codecentric.boot.admin.server.config.AdminServerProperties; import de.codecentric.boot.admin.server.services.ApiMediaTypeHandler; import de.codecentric.boot.admin.server.services.endpoints.ChainingStrategy; import de.codecentric.boot.admin.server.services.endpoints.EndpointDetectionStrategy; import de.codecentric.boot.admin.server.services.endpoints.ProbeEndpointsStrategy; import de.codecentric.boot.admin.server.services.endpoints.QueryIndexEndpointStrategy; import de.codecentric.boot.admin.server.web.client.InstanceWebClient; Configuration public class EndpointDetectionConfig { Bean public EndpointDetectionStrategy endpointDetectionStrategy( InstanceWebClient instanceWebClient, AdminServerProperties properties, ApiMediaTypeHandler apiMediaTypeHandler) { return new ChainingStrategy( new QueryIndexEndpointStrategy(instanceWebClient, apiMediaTypeHandler), new ProbeEndpointsStrategy(instanceWebClient, properties.getProbedEndpoints()), new CustomEndpointStrategy() // Your custom strategy as last resort ); } }编写自定义 EndpointDetectionStrategy接口定义自定义检测逻辑只需实现 EndpointDetectionStrategy.java 中的接口该方法接收Instance包含注册信息与元数据返回一个MonoEndpointspackage de.codecentric.boot.admin.server.services.endpoints; import reactor.core.publisher.Mono; import de.codecentric.boot.admin.server.domain.entities.Instance; import de.codecentric.boot.admin.server.domain.values.Endpoints; public interface EndpointDetectionStrategy { MonoEndpoints detectEndpoints(Instance instance); }约定返回Mono.empty()表示本策略无法判定交由 ChainingStrategy 中的下一个策略继续处理返回Endpoints.of(...)则直接作为检测结果。示例一基于元数据的静态端点策略根据实例注册时携带的元数据metadata定义端点package com.example.admin; import reactor.core.publisher.Mono; import de.codecentric.boot.admin.server.domain.entities.Instance; import de.codecentric.boot.admin.server.domain.values.Endpoint; import de.codecentric.boot.admin.server.domain.values.Endpoints; import de.codecentric.boot.admin.server.services.endpoints.EndpointDetectionStrategy; public class MetadataEndpointStrategy implements EndpointDetectionStrategy { Override public MonoEndpoints detectEndpoints(Instance instance) { String managementUrl instance.getRegistration().getManagementUrl(); if (managementUrl null) { return Mono.empty(); } // Read endpoints from metadata String endpointList instance.getRegistration() .getMetadata() .get(endpoints); if (endpointList null || endpointList.isBlank()) { return Mono.empty(); } // Parse comma-separated endpoint IDs ListEndpoint endpoints Arrays.stream(endpointList.split(,)) .map(String::trim) .map(id - Endpoint.of(id, managementUrl / id)) .toList(); return Mono.just(Endpoints.of(endpoints)); } }客户端侧通过元数据声明端点列表与 客户端注册与元数据 文档中的机制一致spring: boot: admin: client: instance: metadata: endpoints: health,info,metrics,env服务端侧将该策略放入链中并放在内置策略之前优先尝试Bean public EndpointDetectionStrategy endpointDetectionStrategy() { return new ChainingStrategy( new MetadataEndpointStrategy(), new QueryIndexEndpointStrategy(...) ); }示例二按服务名区分端点的策略不同微服务暴露的端点集可能不同可以基于服务名registration.getName()返回差异化端点package com.example.admin; import reactor.core.publisher.Mono; import de.codecentric.boot.admin.server.domain.entities.Instance; import de.codecentric.boot.admin.server.domain.values.Endpoint; import de.codecentric.boot.admin.server.domain.values.Endpoints; import de.codecentric.boot.admin.server.services.endpoints.EndpointDetectionStrategy; public class ServiceSpecificEndpointStrategy implements EndpointDetectionStrategy { private final MapString, ListString serviceEndpoints; public ServiceSpecificEndpointStrategy() { this.serviceEndpoints Map.of( payment-service, List.of(health, info, metrics, payments), user-service, List.of(health, info, metrics, users), legacy-service, List.of(health, info) // Limited endpoints ); } Override public MonoEndpoints detectEndpoints(Instance instance) { String serviceName instance.getRegistration().getName(); String managementUrl instance.getRegistration().getManagementUrl(); if (managementUrl null) { return Mono.empty(); } ListString endpointIds serviceEndpoints.get(serviceName); if (endpointIds null) { return Mono.empty(); // Fall back to next strategy } ListEndpoint endpoints endpointIds.stream() .map(id - Endpoint.of(id, managementUrl / id)) .toList(); return Mono.just(Endpoints.of(endpoints)); } }示例三数据库驱动的端点策略将端点配置存入数据库检测时按服务名查询示例使用 Spring Data Reactive MongoDBpackage com.example.admin; import java.util.List; import reactor.core.publisher.Mono; import de.codecentric.boot.admin.server.domain.entities.Instance; import de.codecentric.boot.admin.server.domain.values.Endpoint; import de.codecentric.boot.admin.server.domain.values.Endpoints; import de.codecentric.boot.admin.server.services.endpoints.EndpointDetectionStrategy; public class DatabaseEndpointStrategy implements EndpointDetectionStrategy { private final EndpointConfigRepository endpointConfigRepository; public DatabaseEndpointStrategy(EndpointConfigRepository repository) { this.endpointConfigRepository repository; } Override public MonoEndpoints detectEndpoints(Instance instance) { String serviceName instance.getRegistration().getName(); String managementUrl instance.getRegistration().getManagementUrl(); if (managementUrl null) { return Mono.empty(); } return endpointConfigRepository.findByServiceName(serviceName) .map(config - { ListEndpoint endpoints config.getEndpointIds().stream() .map(id - Endpoint.of(id, managementUrl / id)) .toList(); return Endpoints.of(endpoints); }) .switchIfEmpty(Mono.empty()); } } Repository interface EndpointConfigRepository extends ReactiveMongoRepositoryEndpointConfig, String { MonoEndpointConfig findByServiceName(String serviceName); } Document class EndpointConfig { private String serviceName; private ListString endpointIds; // getters/setters }示例四HTTP 发现服务拉取端点从自定义的发现服务Discovery Service按服务名拉取端点列表并做好异常兜底package com.example.admin; import reactor.core.publisher.Mono; import org.springframework.web.reactive.function.client.WebClient; import de.codecentric.boot.admin.server.domain.entities.Instance; import de.codecentric.boot.admin.server.domain.values.Endpoint; import de.codecentric.boot.admin.server.domain.values.Endpoints; import de.codecentric.boot.admin.server.services.endpoints.EndpointDetectionStrategy; public class DiscoveryServiceEndpointStrategy implements EndpointDetectionStrategy { private final WebClient webClient; public DiscoveryServiceEndpointStrategy(WebClient.Builder webClientBuilder) { this.webClient webClientBuilder.baseUrl(http://discovery-service).build(); } Override public MonoEndpoints detectEndpoints(Instance instance) { String serviceName instance.getRegistration().getName(); String managementUrl instance.getRegistration().getManagementUrl(); if (managementUrl null) { return Mono.empty(); } return webClient.get() .uri(/services/{name}/endpoints, serviceName) .retrieve() .bodyToFlux(String.class) .collectList() .map(endpointIds - { ListEndpoint endpoints endpointIds.stream() .map(id - Endpoint.of(id, managementUrl / id)) .toList(); return Endpoints.of(endpoints); }) .onErrorResume(e - Mono.empty()); } }端点检测的生命周期检测触发时机端点检测发生在以下时机对应源码中的 EndpointDetector.java 及配套的EndpointDetectionTrigger事件监听机制实例注册之后InstanceRegisteredEvent触发端点首次被访问时若尚未完成检测周期性触发也可以手动触发。手动触发检测Autowired private EndpointDetector endpointDetector; public void refreshEndpoints(InstanceId instanceId) { endpointDetector.detectEndpoints(instanceId).subscribe(); }注意detectEndpoints(InstanceId)返回MonoVoid内部实际调用的是策略的detectEndpoints(Instance)并用结果更新Instance.withEndpoints(...)因此调用方需要订阅subscribe()才能真正执行。调试端点检测开启调试日志logging: level: de.codecentric.boot.admin.server.services.EndpointDetector: DEBUG de.codecentric.boot.admin.server.services.endpoints: DEBUG典型日志输出DEBUG EndpointDetector - Detect endpoints for Instance{idabc123} DEBUG QueryIndexEndpointStrategy - Querying actuator-index for instance abc123 on http://client:8080/actuator successful. DEBUG EndpointDetector - Detected endpoints: [health, info, metrics, env]从源码还可以看到更多有价值的调试线索例如QueryIndexEndpointStrategy在managementUrl缺失或与serviceUrl相同时打印 Querying actuator-index for instance ... omitted.在非 2xx 或 Content-Type 不兼容时打印 failed with status ... 与 failed with incompatible Content-Type ...ProbeEndpointsStrategy则会逐端点打印 Endpoint probe ... successful/failed。通过 API 检查已检测端点APIcurl http://admin-server:8080/instances/{id} | jq .endpoints响应[ { id: health, url: http://localhost:8080/actuator/health }, { id: info, url: http://localhost:8080/actuator/info }, { id: metrics, url: http://localhost:8080/actuator/metrics } ]进阶场景场景一兼容 Spring Boot 1.x 老版本Spring Boot 1.x 没有/actuator索引因此需要仅使用探测策略并把旧版端点映射到新路径trace:httptrace、dump:threaddump即利用id:path语法配置spring: boot: admin: probed-endpoints: # Spring Boot 1.x endpoints - health - info - metrics - env - trace:httptrace - dump:threaddump策略Bean public EndpointDetectionStrategy endpointDetectionStrategy( InstanceWebClient instanceWebClient, AdminServerProperties properties) { // Only use probing for legacy apps return new ProbeEndpointsStrategy( instanceWebClient, properties.getProbedEndpoints() ); }场景二混合 Spring Boot 版本集群中同时存在 2.x 与 1.x 应用时使用 ChainingStrategy 让现代应用走索引查询、老应用自动回退到探测Bean public EndpointDetectionStrategy endpointDetectionStrategy( InstanceWebClient instanceWebClient, AdminServerProperties properties, ApiMediaTypeHandler apiMediaTypeHandler) { return new ChainingStrategy( // Try modern Spring Boot 2.x first new QueryIndexEndpointStrategy(instanceWebClient, apiMediaTypeHandler), // Fall back to probing for legacy apps new ProbeEndpointsStrategy(instanceWebClient, properties.getProbedEndpoints()) ); }场景三自定义 Actuator 基础路径客户端若把 Actuator 的基础路径改成了非/actuator的路径如/management索引查询策略仍然可以工作——因为它直接请求managementUrl。以下自定义策略展示了按需适配的基础写法客户端自定义 actuator 基础路径management: endpoints: web: base-path: /management # Not /actuator服务端策略public class CustomPathEndpointStrategy implements EndpointDetectionStrategy { Override public MonoEndpoints detectEndpoints(Instance instance) { String managementUrl instance.getRegistration().getManagementUrl(); // Adjust for custom base path if (managementUrl ! null !managementUrl.endsWith(/actuator)) { // Query custom index endpoint return queryIndex(instance, managementUrl); } return Mono.empty(); } }场景四根据元数据条件选择策略根据实例元数据如spring-boot-version在运行时动态决定使用哪种内置策略public class ConditionalEndpointStrategy implements EndpointDetectionStrategy { private final QueryIndexEndpointStrategy queryStrategy; private final ProbeEndpointsStrategy probeStrategy; Override public MonoEndpoints detectEndpoints(Instance instance) { String version instance.getRegistration() .getMetadata() .get(spring-boot-version); if (version ! null version.startsWith(1.)) { // Use probing for Spring Boot 1.x return probeStrategy.detectEndpoints(instance); } else { // Use index query for Spring Boot 2.x return queryStrategy.detectEndpoints(instance); } } }性能考量QueryIndexEndpointStrategy优点仅一次 HTTP 请求检测速度快结果准确不会产生误报端点来自 Actuator 官方索引。缺点要求客户端为 Spring Boot 2.x 及以上要求/actuator索引处于启用状态。ProbeEndpointsStrategy优点兼容任意 Spring Boot 版本可以发现不在索引中的自定义端点。缺点每个端点一次 HTTP 请求请求数随探测列表线性增长尽管源码使用flatMap并发执行整体仍更慢若客户端不支持OPTIONS方法可能产生误报例如返回 200 但端点并不真正存在——这也是默认场景中它会排在索引查询之后的原因。优化建议探测列表只保留必需端点减少不必要的网络请求spring: boot: admin: probed-endpoints: - health - info - metrics # Remove rarely-used endpoints故障排查问题一没有检测到任何端点可能原因检测策略执行失败。排查开启端点检测包的调试日志确认是哪个环节返回空结果logging: level: de.codecentric.boot.admin.server.services.endpoints: DEBUG检查清单managementUrl已正确设置若与serviceUrl相同索引查询会被跳过实例网络可达且未配置错误的认证/超时Actuator 端点确实已暴露management.endpoints.web.exposure.include是否正确配置。问题二检测到了错误的端点可能原因探测策略把并不存在的端点误判为可用如客户端对任意OPTIONS都返回 2xx。解决方案仅使用QueryIndexEndpointStrategy以 Actuator 索引为准Bean public EndpointDetectionStrategy endpointDetectionStrategy( InstanceWebClient instanceWebClient, ApiMediaTypeHandler apiMediaTypeHandler) { return new QueryIndexEndpointStrategy(instanceWebClient, apiMediaTypeHandler); }问题三自定义端点未被检测到可能原因自定义端点既不在probed-endpoints列表中也未出现在 Actuator 索引中例如未暴露或属于旧版端点。解决方案将其加入探测列表spring: boot: admin: probed-endpoints: - health - info - my-custom-endpoint或者为它编写一个自定义检测策略。完整示例元数据 索引 探测三级策略链综合前文全部内容一个同时利用元数据声明 → 索引查询 → 端点探测三级策略的完整配置如下package com.example.admin; import java.util.Arrays; import java.util.List; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import reactor.core.publisher.Mono; import de.codecentric.boot.admin.server.config.AdminServerProperties; import de.codecentric.boot.admin.server.domain.entities.Instance; import de.codecentric.boot.admin.server.domain.values.Endpoint; import de.codecentric.boot.admin.server.domain.values.Endpoints; import de.codecentric.boot.admin.server.services.ApiMediaTypeHandler; import de.codecentric.boot.admin.server.services.endpoints.ChainingStrategy; import de.codecentric.boot.admin.server.services.endpoints.EndpointDetectionStrategy; import de.codecentric.boot.admin.server.services.endpoints.ProbeEndpointsStrategy; import de.codecentric.boot.admin.server.services.endpoints.QueryIndexEndpointStrategy; import de.codecentric.boot.admin.server.web.client.InstanceWebClient; Configuration public class EndpointDetectionConfig { Bean public EndpointDetectionStrategy endpointDetectionStrategy( InstanceWebClient instanceWebClient, AdminServerProperties properties, ApiMediaTypeHandler apiMediaTypeHandler) { return new ChainingStrategy( // 1. Try metadata-based detection new MetadataEndpointStrategy(), // 2. Try standard actuator index query new QueryIndexEndpointStrategy(instanceWebClient, apiMediaTypeHandler), // 3. Fall back to probing new ProbeEndpointsStrategy(instanceWebClient, properties.getProbedEndpoints()) ); } /** * Detect endpoints from instance metadata */ static class MetadataEndpointStrategy implements EndpointDetectionStrategy { Override public MonoEndpoints detectEndpoints(Instance instance) { String managementUrl instance.getRegistration().getManagementUrl(); if (managementUrl null) { return Mono.empty(); } String endpointList instance.getRegistration() .getMetadata() .get(endpoints); if (endpointList null || endpointList.isBlank()) { return Mono.empty(); } ListEndpoint endpoints Arrays.stream(endpointList.split(,)) .map(String::trim) .map(id - Endpoint.of(id, managementUrl / id)) .toList(); return Mono.just(Endpoints.of(endpoints)); } } }客户端配置可选元数据spring: boot: admin: client: instance: metadata: endpoints: health,info,metrics,custom总结端点检测是 Admin Server 与客户端 Actuator 之间的桥梁默认的ChainingStrategy索引查询 探测回退已能覆盖绝大多数 Spring Boot 2.x/1.x 混合场景当遇到特殊路径、私有端点、元数据驱动或外部配置中心时则可以通过实现 EndpointDetectionStrategy 接口并注册Bean无缝替换或扩展默认行为。调试时善用EndpointDetector与endpoints包下的 DEBUG 日志可以快速定位是没检测还是检错了。更多服务端整体配置请参考 服务端配置文档。【免费下载链接】spring-boot-adminAdmin UI for administration of spring boot applications项目地址: https://gitcode.com/gh_mirrors/sp/spring-boot-admin创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考