Commit 1c9c6be7 by weisong

fix conflict

parent 8245c32f
......@@ -11,7 +11,6 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class TheWebMvcConfigurer implements WebMvcConfigurer {
<<<<<<< HEAD
// @Autowired
// private LoginInterceptor loginInterceptor;
//
......@@ -37,32 +36,5 @@ public class TheWebMvcConfigurer implements WebMvcConfigurer {
// public WebAuthInterceptor webAuthInterceptor() {
// return new WebAuthInterceptor();
// }
=======
@Autowired
private LoginInterceptor loginInterceptor;
@Override
public void addInterceptors(InterceptorRegistry registry) {
// 注册登录拦截器,并设置拦截路径和排除路径
registry.addInterceptor(loginInterceptor)
.addPathPatterns("/**") // 拦截所有路径
.excludePathPatterns( // 排除一些路径
"/sys/**",
"/verify/**",
"/person/**",
"/text/**",
"/error/**",
"/error"
);
registry.addInterceptor(webAuthInterceptor());
}
@Bean
public WebAuthInterceptor webAuthInterceptor() {
return new WebAuthInterceptor();
}
>>>>>>> 3bc7fe8847766d39bf419c764c9495af3590dfa2
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment