依赖:
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-hystrix</artifactId> </dependency> <!--dashboard图形化界面--> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId> </dependency> <!--如果已经有了就不用再引入了--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency>
配置,开放spring-boot-starter-actuator所有接口
management: endpoints: web: exposure: include: '*' endpoint: health: show-details: ALWAYS
打开网站
监控