关于用AOP JoinPoint ,反射获取Controller层的方法参数问题。 Request processing failed; nested exception is java.lang.reflect.UndeclaredThrowableException
@Component
@Aspect
public class LogAop
{
@Autowired
private HttpServletRequest request;
@Autowired
private ISysLogService iSysLogService;
private Date visitTime;
private Class clazz;
private Method method;
@Before("execution(* com.itheima.controller.*.*(..))")
public void doBefore(JoinPoint jp) throws NoSuchMethodException {
visitTime = new Date();
clazz = jp.getTarget().getClass();
String methodName = jp.getSignature().getName();
Object[] args = jp.getArgs(