Maven
Şu satırı dahil ederiz
Örnek<dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId></dependency>
Şöyle yaparız
@SpringBootApplication@EnableHystrixDashboard@EnableCircuitBreakerpublic 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