ADD file via upload

master
pxh4iabou 2 years ago
parent 51da621b8c
commit 0b6c813817

@ -0,0 +1,16 @@
package com.example.common.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class MyInterceptorConfig implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
// 实现WebMvcConfigurer不会导致静态资源被拦截
registry.addInterceptor(new MyInterceptor())
.addPathPatterns("/end/page/**")
.excludePathPatterns("/end/page/login.html", "/end/page/register.html");
}
}
Loading…
Cancel
Save