为什么其他的request方法都得到结果了,唯独没有得到getMethod呢?
public void doBefore(JoinPoint joinPoint){
ServletRequestAttributes attributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
javax.servlet.http.HttpServletRequest request = attributes.getRequest();
//url
logger.info("url={}", request.getRequestURL());
//ip
logger.info("ip={}", request.getRemoteAddr());
//Method:get,post等
logger.info("method:", request.getMethod());
//类方法
logger.info("classMethod={}", joinPoint.getSignature().getDeclaringTypeName() + "." + joinPoint.getSignature().getName());
//params
logger.info("params={}", joinPoint.getArgs());
}