From e618804c75dde7707536e7933d2ea696989aaf74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20R=C3=A4del?= Date: Fri, 19 Aug 2016 07:29:03 +0200 Subject: [PATCH] Added Hystrix Dashboard --- .../spring-cloud-hystrix-rest-consumer/pom.xml | 10 ++++++++++ .../hystrix/rest/consumer/RestConsumerApplication.java | 3 +++ 2 files changed, 13 insertions(+) diff --git a/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/pom.xml b/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/pom.xml index b9da24b9a5..c9be67c302 100644 --- a/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/pom.xml +++ b/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/pom.xml @@ -23,6 +23,11 @@ spring-cloud-starter-hystrix 1.1.5.RELEASE + + org.springframework.cloud + spring-cloud-starter-hystrix-dashboard + 1.1.5.RELEASE + org.springframework.boot spring-boot-starter-web @@ -33,6 +38,11 @@ spring-boot-starter-thymeleaf 1.4.0.RELEASE + + org.springframework.boot + spring-boot-starter-actuator + 1.4.0.RELEASE + diff --git a/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/RestConsumerApplication.java b/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/RestConsumerApplication.java index 051fd9a9bb..9df745b1c6 100644 --- a/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/RestConsumerApplication.java +++ b/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/RestConsumerApplication.java @@ -4,6 +4,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker; +import org.springframework.cloud.netflix.hystrix.EnableHystrix; +import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PathVariable; @@ -11,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping; @SpringBootApplication @EnableCircuitBreaker +@EnableHystrixDashboard @Controller public class RestConsumerApplication { @Autowired