1源程序清单@Configuration@Slf4jpublic class WebAppConfig implements WebMvcConfigurer {@Overridepublic void addInterceptors(InterceptorRegistry registry) {//登录拦截的管理器InterceptorRegistration registration = registry.addInterceptor(loginInterceptor());//拦截的地址registration.addPathPatterns("/**");//方行的地址//registration.excludePathPatterns("/**");//根据需要拦截,一般设置所有地址拦截,放行公共连接}@Beanpublic LoginInterceptor loginInterceptor(){return new LoginInterceptor();}}package com.project.demo....
发表评论取消回复