|
|
|
@ -1,6 +1,5 @@
|
|
|
|
|
package com.ruoyi.framework.aspectj;
|
|
|
|
|
|
|
|
|
|
import java.lang.reflect.Method;
|
|
|
|
|
import java.util.Objects;
|
|
|
|
|
import org.aspectj.lang.ProceedingJoinPoint;
|
|
|
|
|
import org.aspectj.lang.annotation.Around;
|
|
|
|
@ -62,8 +61,6 @@ public class DataSourceAspect
|
|
|
|
|
public DataSource getDataSource(ProceedingJoinPoint point)
|
|
|
|
|
{
|
|
|
|
|
MethodSignature signature = (MethodSignature) point.getSignature();
|
|
|
|
|
// point.getTarget().getClass(); 这个获取的是动态代理的class,上面获取不到自定义注解
|
|
|
|
|
// 先获取方法上的,获取不到啊再从class上找
|
|
|
|
|
DataSource dataSource = AnnotationUtils.findAnnotation(signature.getMethod(), DataSource.class);
|
|
|
|
|
if (Objects.nonNull(dataSource))
|
|
|
|
|
{
|
|
|
|
|