1 package common.http.interceptor;
2
3 import javax.servlet.ServletContext;
4 import javax.servlet.annotation.HandlesTypes;
5 import java.util.Set;
6
7
8
9
10
11 @HandlesTypes(ServletInterceptor.class)
12 public class ServletContainerInitializer implements javax.servlet.ServletContainerInitializer {
13
14
15
16
17 @Override
18 public void onStartup(Set<Class<?>> set, ServletContext servletContext) {
19
20 set.stream().map(x -> (Class<? extends ServletInterceptor<?>>) x).forEach(ServletInterceptorFactory::register);
21 }
22 }