Search in sources :

Example 1 with HystrixEventStreamServlet

use of org.apache.camel.component.hystrix.metrics.servlet.HystrixEventStreamServlet in project camel by apache.

the class HystrixMappingAutoConfiguration method servletRegistrationBean.

@Bean
ServletRegistrationBean servletRegistrationBean(HystrixMappingConfiguration config) {
    ServletRegistrationBean mapping = new ServletRegistrationBean();
    mapping.setServlet(new HystrixEventStreamServlet());
    mapping.addUrlMappings(config.getPath());
    mapping.setName(config.getServletName());
    return mapping;
}
Also used : ServletRegistrationBean(org.springframework.boot.web.servlet.ServletRegistrationBean) HystrixEventStreamServlet(org.apache.camel.component.hystrix.metrics.servlet.HystrixEventStreamServlet) ConditionalOnBean(org.springframework.boot.autoconfigure.condition.ConditionalOnBean) ServletRegistrationBean(org.springframework.boot.web.servlet.ServletRegistrationBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

HystrixEventStreamServlet (org.apache.camel.component.hystrix.metrics.servlet.HystrixEventStreamServlet)1 ConditionalOnBean (org.springframework.boot.autoconfigure.condition.ConditionalOnBean)1 ServletRegistrationBean (org.springframework.boot.web.servlet.ServletRegistrationBean)1 Bean (org.springframework.context.annotation.Bean)1