添加拦截器 便于测试
This commit is contained in:
parent
ab6192a106
commit
6709c951ed
@ -15,7 +15,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
public class RequestInterceptor implements HandlerInterceptor {
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
||||
log.info("访问 {}",request.getRequestURI());
|
||||
log.info("{} 访问 {}",request.getRemoteHost(), request.getRequestURI());
|
||||
return true;
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@ public class WebConfig implements WebMvcConfigurer {
|
||||
@Override
|
||||
public void addInterceptors(@NotNull InterceptorRegistry registry) {
|
||||
registry.addInterceptor(requestInterceptor)
|
||||
.excludePathPatterns("/index/hook/**")
|
||||
.excludePathPatterns("/index/hook/**","/static/**")
|
||||
.addPathPatterns("/**");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user