Check out the full series of Questions Management tutorial here.
After creating the Spring Boot project for Support Monitor Dashboard, now is the time to implement Hystrix Dashboard for Questions Management application.
You can refer to the Hystrix Dashboard here.
To do this, first you need to open the SupportMonitorDashboardApplication file to add @EnableHystrixDashboard annotation:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
package com.huongdanjava.qm.monitordashboard; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard; @SpringBootApplication @EnableHystrixDashboard public class SupportMonitorDashboardApplication { public static void main(String[] args) { SpringApplication.run(SupportMonitorDashboardApplication.class, args); } } |
After that, you declare the information of the Monitor Dashboard including name and port that will run in application.properties file:
1 2 3 |
spring.application.name=Support Monitor Dashboard server.port=8480 |
Now, you can start this application and go to http://localhost:8480/hystrix, you will see the following result: