Код: Выделить всё
@Configuration
public class WebConfig implements WebMvcConfigurer {
@Autowired
JdbcTemplate jdbcTemplate;
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new HandlerInterceptor() {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception {
String subdomain = extractSubdomain(request);
verifySubdomain(subdomain);
return true;
}
}).excludePathPatterns("/**/clientcontrol/**", "/**/localhost/**").pathMatcher(new AntPathMatcher());
}
}
Код: Выделить всё
.excludePathPatterns("/clientcontrol/**", "/localhost/**").pathMatcher(new AntPathMatcher());
.excludePathPatterns("/clientcontrol/**", "/localhost/**");
.addPathPatterns("/**").excludePathPatterns("/clientcontrol/**", "/localhost/**").pathMatcher(new AntPathMatcher());
Подробнее здесь: https://stackoverflow.com/questions/790 ... pring-boot