springboot中使用拦截器
1、创建实现类实现 HandlerInterceptor 接口:public class UserInterceptor implements HandlerInterceptor { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { //定义拦截规则
原创
2020-11-25 17:41:25 ·
176 阅读 ·
0 评论