|
@@ -4,7 +4,6 @@ import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
|
|
import org.aspectj.lang.ProceedingJoinPoint;
|
|
|
import org.aspectj.lang.annotation.Around;
|
|
|
import org.aspectj.lang.annotation.Aspect;
|
|
|
-import org.aspectj.lang.annotation.Pointcut;
|
|
|
import org.springframework.core.Ordered;
|
|
|
import org.springframework.core.annotation.Order;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -14,12 +13,7 @@ import org.springframework.stereotype.Component;
|
|
|
@Order(Ordered.HIGHEST_PRECEDENCE)
|
|
|
public class DataSourceAspect {
|
|
|
|
|
|
- @Pointcut("execution (* com.*.*.service.*.*.*(..)) || execution (* com.*.*.service.*.*(..)) || execution(* com.*.*.flow.*.*(..))")
|
|
|
- public void pointcut() {
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- @Around(value = "pointcut()")
|
|
|
+ @Around(value = "execution (* com.*.*.service.*.*.*(..)) || execution (* com.*.*.service.*.*(..)) || execution(* com.*.*.flow.*.*(..))")
|
|
|
public Object before(ProceedingJoinPoint point) throws Throwable {
|
|
|
Object target = point.getTarget();
|
|
|
String name = target.getClass().getName();
|