1. 添加actuator依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
2. 访问服务:
http://192.168.3.9:8201/actuator
http://localhost:8201/actuator/health
3.
-- 如若还不行,可以添加actuator配置:
#开启健康检查,如果配置了上下文,需要添加如下
spring.cloud.nacos.discovery.metadata.management.context-path=/${spring.application.name}/actuator
#配置actuator
management.endpoints.health.show-details=always
# 暴露所有端点,默认是info和health
management.endpoints.web.exposure.include=*