package pl.java.scalatech;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.system.ApplicationPidFileWriter;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.web.bind.annotation.RequestMapping;

@SpringBootApplication
@EnableCircuitBreaker
@EnableHystrixDashboard
@EnableDiscoveryClient
public class DashboardHystrixApplication {
   
    @RequestMapping("/")
    public String home() {
        return "forward:/hystrix";
    }
    
    public static void main(String[] args) {
        springPIDAppRun(args, DashboardHystrixApplication.class);
    }
    private static void springPIDAppRun(String[] args,Class<?> clazz) {
        SpringApplication springApplication = new SpringApplication(clazz);
        springApplication.addListeners(new ApplicationPidFileWriter());
        springApplication.run(args);
    }
}

@@ -202,24 +202,93 @@
 FileWriter;%0A
+import org.springframework.boot.web.servlet.ServletRegistrationBean;%0A
 import org.s
@@ -348,24 +348,24 @@
 uitBreaker;%0A
-
 import org.s
@@ -508,16 +508,118 @@
 hboard;%0A
+import org.springframework.context.annotation.Bean;%0Aimport org.springframework.stereotype.Controller;%0A
 import o
@@ -766,16 +766,28 @@
 yClient%0A
+@Controller%0A
 public c
@@ -1297,16 +1297,170 @@
 (args);%0A
-
     %7D%0A
+    @Bean%0A    public ServletRegistrationBean mockStreamServlet() %7B%0A        return new ServletRegistrationBean(new MockStreamServlet(), %22/mock.stream%22);%0A%7D%0A
 %7D%0A

Update DashboardHystrixApplication.java