//获取方法上的注解
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
Method method = signature.getMethod();
TargetDataSource annotation = method.getAnnotation(TargetDataSource.class);
//获取类上的注解
TargetDataSource targetDataSource = method.getDeclaringClass().getAnnotation(TargetDataSource.class);
aop里获取mapper上注解
猜你喜欢
转载自blog.csdn.net/qq_35494808/article/details/90177452
今日推荐
周排行