| | |
| | | package com.ycl.config; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; |
| | |
| | | return new Intercept(); |
| | | } |
| | | |
| | | @Autowired |
| | | IgnoreUrlsConfig urlsConfig; |
| | | |
| | | @Override |
| | | public void addInterceptors(InterceptorRegistry registry) { |
| | | registry.addInterceptor(this.Intercept()) |
| | | //需要验证请求路径 /*代表全部 |
| | | .addPathPatterns("/newsAdmin/login"); |
| | | .addPathPatterns("/*") |
| | | .excludePathPatterns(urlsConfig.getUrls()); |
| | | } |
| | | } |