首页>代码>spring boot+mybatis开发海底捞的排队系统(简易版)>/hdl/src/main/java/vip/waitfor/hdl/configurer/WebAppConfigurer.java
package vip.waitfor.hdl.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.hdl.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("/user/login"); excludePathPatterns.add("/web/admin-login.html"); excludePathPatterns.add("/web/hdl.html"); // 黑名单 List<String> PathPatterns = new ArrayList<>(); PathPatterns.add("/user/**"); PathPatterns.add("/web/**"); // 注册 registry.addInterceptor(new LoginInterceptor()).addPathPatterns(PathPatterns) .excludePathPatterns(excludePathPatterns); } }

xshxxm1 LV21
8月26日
TY0165 LV20
2024年6月18日
autonomy LV1
2024年4月12日
kkkllll LV2
2024年1月24日
hbj1285984841 LV4
2023年10月19日
iceboard LV2
2023年6月4日
万紫怡 LV4
2023年5月15日
youzitao LV11
2023年4月17日
朱朱啊哈 LV16
2023年1月31日
LukeMaster LV1
2022年11月19日

Phoebe_HUI LV5
1月14日
yimaoermao LV1
2024年11月28日
17507331220
2024年11月19日
暂无贡献等级
grant1123 LV2
2024年6月22日
TY0165 LV20
2024年6月18日
来一杯西瓜冰咩 LV6
2024年5月14日
1941549176 LV4
2024年5月9日
autonomy LV1
2024年4月12日
微信网友_6927932988952576 LV12
2024年3月31日
WBelong LV8
2024年3月29日