Commit 4ca9d5f7 by Dave Syer

Break up hystrix dashboard

parent cf96d6dd
......@@ -159,6 +159,21 @@
<artifactId>jersey-server</artifactId>
<version>1.13</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>d3js</artifactId>
<version>3.4.11</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>3.2.0</version>
</dependency>
</dependencies>
</dependencyManagement>
......
package org.springframework.cloud.netflix.hystrix;
import com.netflix.hystrix.contrib.javanica.aop.aspectj.HystrixCommandAspect;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......@@ -8,7 +9,6 @@ import org.springframework.context.annotation.ImportAware;
import org.springframework.core.annotation.AnnotationAttributes;
import org.springframework.core.type.AnnotationMetadata;
import org.springframework.cloud.netflix.hystrix.annotations.EnableHystrix;
import org.springframework.cloud.netflix.endpoint.HystrixStreamEndpoint;
import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;
......
package org.springframework.cloud.netflix.endpoint;
package org.springframework.cloud.netflix.hystrix;
import org.springframework.cloud.netflix.endpoint.ServletWrappingEndpoint;
import com.netflix.hystrix.contrib.metrics.eventstream.HystrixMetricsStreamServlet;
......
package org.springframework.cloud.netflix.hystrix.annotations;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.cloud.netflix.hystrix.HystrixDashboardConfiguration;
import org.springframework.context.annotation.Import;
/**
* Created by sgibb on 6/19/14.
*/
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Import(HystrixDashboardConfiguration.class)
public @interface EnableHystrixDashboard {
}
\ No newline at end of file
package io.spring.cloud.netflix.hystrix;
import io.spring.cloud.netflix.hystrix.stream.MockStreamServlet;
import io.spring.cloud.netflix.hystrix.stream.ProxyStreamServlet;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.embedded.ServletRegistrationBean;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.cloud.netflix.hystrix.annotations.EnableHystrixDashboard;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
......@@ -15,16 +16,17 @@ import org.springframework.context.annotation.Configuration;
*/
@Configuration
@ComponentScan
@EnableHystrixDashboard
@EnableAutoConfiguration
public class Application extends SpringBootServletInitializer {
public class HystrixDashboardApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(Application.class).web(true);
return application.sources(HystrixDashboardApplication.class).web(true);
}
public static void main(String[] args) {
new SpringApplicationBuilder(Application.class).web(true).run(args);
new SpringApplicationBuilder(HystrixDashboardApplication.class).web(true).run(args);
}
@Bean
......@@ -32,8 +34,4 @@ public class Application extends SpringBootServletInitializer {
return new ServletRegistrationBean(new MockStreamServlet(), "/mock.stream");
}
@Bean
public ServletRegistrationBean proxyStreamServlet() {
return new ServletRegistrationBean(new ProxyStreamServlet(), "/proxy.stream");
}
}
......@@ -9,7 +9,6 @@ endpoints:
server:
port: 7979
context-path: /hystrix-dashboard
logging:
level: INFO
......
package io.spring.cloud.netflix.zuul;
import com.netflix.zuul.context.ContextLifecycleFilter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.context.embedded.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.cloud.netflix.endpoint.HystrixStreamEndpoint;
import org.springframework.cloud.netflix.hystrix.HystrixStreamEndpoint;
import org.springframework.cloud.netflix.zuul.Routes;
import org.springframework.scheduling.annotation.EnableScheduling;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment