Search in sources :

Example 1 with CatFilter

use of com.dianping.cat.servlet.CatFilter in project x-pipe by ctripcorp.

the class CatConfig method catFilter.

@Bean
public FilterRegistrationBean catFilter() {
    FilterRegistrationBean bean = new FilterRegistrationBean();
    bean.setFilter(new CatFilter());
    bean.setName("cat-filter");
    bean.addUrlPatterns("/*");
    bean.setDispatcherTypes(DispatcherType.REQUEST, DispatcherType.FORWARD);
    return bean;
}
Also used : CatFilter(com.dianping.cat.servlet.CatFilter) FilterRegistrationBean(org.springframework.boot.context.embedded.FilterRegistrationBean) ServletListenerRegistrationBean(org.springframework.boot.context.embedded.ServletListenerRegistrationBean) FilterRegistrationBean(org.springframework.boot.context.embedded.FilterRegistrationBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

CatFilter (com.dianping.cat.servlet.CatFilter)1 FilterRegistrationBean (org.springframework.boot.context.embedded.FilterRegistrationBean)1 ServletListenerRegistrationBean (org.springframework.boot.context.embedded.ServletListenerRegistrationBean)1 Bean (org.springframework.context.annotation.Bean)1