1 package de.juplo.yourshouter;
5 import javax.inject.Inject;
7 import org.springframework.context.annotation.Configuration;
8 import org.springframework.social.connect.UsersConnectionRepository;
9 import org.springframework.web.servlet.config.annotation.EnableWebMvc;
10 import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
11 import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
15 * Spring MVC Configuration.
21 public class WebMvcConfig extends WebMvcConfigurerAdapter
24 private UsersConnectionRepository usersConnectionRepository;
28 * Configure the {@link UserCookieInterceptor} to intercept all requests.
31 * The {@link InterceptorRegistry} to use.
33 * @see {@link UserCookieInterceptor}
36 public void addInterceptors(InterceptorRegistry registry)
38 registry.addInterceptor(new UserCookieInterceptor(usersConnectionRepository));