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());
}
method后面没有={ },细心点噢