Search in sources :

Example 1 with UserAccessFilter

use of com.ctrip.framework.apollo.portal.spi.ctrip.filters.UserAccessFilter in project apollo by ctripcorp.

the class WebContextConfiguration method userAccessFilter.

@Bean
public FilterRegistrationBean userAccessFilter() {
    FilterRegistrationBean filter = new FilterRegistrationBean();
    filter.setFilter(new UserAccessFilter(userInfoHolder));
    filter.addUrlPatterns("/*");
    return filter;
}
Also used : UserAccessFilter(com.ctrip.framework.apollo.portal.spi.ctrip.filters.UserAccessFilter) FilterRegistrationBean(org.springframework.boot.context.embedded.FilterRegistrationBean) FilterRegistrationBean(org.springframework.boot.context.embedded.FilterRegistrationBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

UserAccessFilter (com.ctrip.framework.apollo.portal.spi.ctrip.filters.UserAccessFilter)1 FilterRegistrationBean (org.springframework.boot.context.embedded.FilterRegistrationBean)1 Bean (org.springframework.context.annotation.Bean)1