public class AnnotationInterceptor extends HandlerInterceptorAdapter implements InitializingBean {
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
HandlerMethod method = (HandlerMethod) handler;
Api methodAnnotation = method.getMethodAnnotation(Api.class);
if (methodAnnotation != null) {
//..
}
}
}
给我:'HandlerMethod cannot be resolved to a type'
一直无法追踪任何关于原因的阅读。