2 Ağustos 2021 Pazartesi

SpringCloud Netflix Hystrix Dashboard

Maven
Şu satırı dahil ederiz
<dependency>
  <groupId>org.springframework.cloud</groupId>
  <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
</dependency>
Örnek
Şöyle yaparız
@SpringBootApplication
@EnableHystrixDashboard
@EnableCircuitBreaker
public class ProductsConsumerApplication {

  public static void main(String[] args) {
    SpringApplication.run(ProductsConsumerApplication.class, args);
  }
}
Açıklaması şöyle
@EnableHystrix is optional. @EnableCircuitBreaker will scan the classpath for any compatible Circuit Breaker implementation, if Hystrix is in classpath then we need not explicitly enable Hystrix.

@EnableHystrixDashboard adds one useful dashboard running on localhost provided by Hystrix to monitor its status.
Dashboard'a bakmak için http://localhost:8080/hystrix adresine gideriz.

Hiç yorum yok:

Yorum Gönder