public class BlockControllAdvice extends HandlerInterceptorAdapter {
private static final Logger log = Logger.getLogger(BlockControllAdvice.class);
/** 权限验证方法,
*
* @param request,response,handler
* @return boolen
* @auther kaungyujian
*/
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
log.debug("into controller advice........");
MultiActionController maControl = (MultiActionController) handler;
ParameterMethodNameResolver pmrResolver = (ParameterMethodNameResolver) maControl.getMethodNameResolver();
String methodName = pmrResolver.getHandlerMethodName(request);
String path = request.getRequestURI(); //获得请求的路径 }
}
springAOP无法拦截controller
最新推荐文章于 2022-01-22 10:45:33 发布