首页>代码>SpringBoot上传excel文件解析并打印Excel数据>/form/src/main/java/vip/waitfor/form/configurer/WebAppConfigurer.java
package vip.waitfor.form.configurer; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import vip.waitfor.form.interceptor.LoginInterceptor; import java.util.ArrayList; import java.util.List; @Configuration public class WebAppConfigurer implements WebMvcConfigurer { @Override public void addInterceptors(InterceptorRegistry registry) { // 白名单 List<String> excludePathPatterns = new ArrayList<>(); excludePathPatterns.add("/web/index.html"); // 黑名单 List<String> PathPatterns = new ArrayList<>(); PathPatterns.add("/user/**"); PathPatterns.add("/web/**"); // 注册 registry.addInterceptor(new LoginInterceptor()).addPathPatterns(PathPatterns) .excludePathPatterns(excludePathPatterns); } }
最近下载更多
wuyu8995861 LV7
2022年7月26日
shaoxf_nihao LV4
2022年6月8日
Patrick1988 LV4
2022年1月14日
newscc LV8
2021年10月18日
阿远远 LV8
2021年10月11日
zoujialuo LV8
2021年10月8日
cp19791101 LV12
2021年9月4日
zhoayabin LV1
2021年8月31日
最代码官方 LV167
2021年8月21日