I have create a PostgreSQL health indicator like this:@Componentpublic class PostgresHealthIndicator extends AbstractHealthIndicator { @Autowired DataSource postgresDataSource; public DataSourceHealthIndicator dbHealthIndicator() { DataSourceHealthIndicator indicator = new DataSourceHealthIndicator(postgresDataSource); return indicator; } @Override protected void doHealthCheck(Health.Builder builder) throws Exception { Health h = dbHealthIndicator().health(); Status status = h.getStatus(); if (status != null && "DOWN".equals(status.getCode())) { builder.down(); } else { builder.up(); } }}In my Application.java I am scanning this package for this component:@ComponentScan({"com.bp.health"})In my application.properties I have the following set:endpoints.health.sensitive=falseendpoints.health.id=healthendpoints.health.enabled=truewhen I hit {url}/health I see:what do I need to do to get the custom health indicator to show? 解决方案 You need to be authenticated to see all the details.Alternatively you could setmanagement.security.enabled=falseendpoints.health.sensitive=falseto see full content unauthenticatedMore information about that can be found here:Production ready monitoring 这篇关于Spring Boot 执行器运行状况端点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!