赞
踩
1.创建拦截器
// 创建拦截器需要实现 HandlerInterceptor 接口
@Slf4j
public class HandleInterceptorImpl implements HandlerInterceptor{
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
log.info("HandleInterceptorImpl.preHandle");
// 该方法会在请求转发到Controller之前被执行
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。