HandlerMethod handlerMethod = (HandlerMethod) handler; 转换错误

dengguikun 发布于 2017/05/24 20:47
阅读 510
收藏 0
public class UserInterceptor implements HandlerInterceptor{

	@Override
	public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
			throws Exception {
		
	        String url = request.getPathInfo() != null?request.getPathInfo():request.getServletPath();//获取当前访问路径
	        
	        HandlerMethod handlerMethod = (HandlerMethod) handler;
	      
	        boolean isAnnotation = handlerMethod.getMethod().isAnnotationPresent(IgnoreLogin.class);
	        
	        if(isAnnotation){
	        	return true;
	        }
	    

 

以下是问题补充:

@dengguikun:有人遇到过没? (2017/05/24 20:59)
加载中
返回顶部
顶部