LLL 1 year ago
parent
commit
e2911a19c6

+ 4 - 4
module_kzks/src/main/java/org/jeecg/modules/dataSourceSwitch/aspect/TargetDataSourceAspect.java

@@ -43,10 +43,10 @@ public class TargetDataSourceAspect {
             if ("SLAVE".equals(annotation.value().name())){
                 if(type != null && type == 1){
                     DataSourceManagement.flag.set(annotation.value().name());
-                    System.out.println("type == 1==========================="+type+annotation.value().name()+"========================");
+                    log.info("type == 1==========================="+type+annotation.value().name()+"========================");
                 }
             }
-            System.out.println(annotation.value().name()+type);
+            log.info(annotation.value().name()+type);
         }else{
             Method method = ((MethodSignature) point.getSignature()).getMethod();
             if(method.isAnnotationPresent(TargetDataSource.class)){
@@ -57,10 +57,10 @@ public class TargetDataSourceAspect {
                 if ("SLAVE".equals(annotation.value().name())){
                     if(type != null && type == 1){
                         DataSourceManagement.flag.set(annotation.value().name());
-                        System.out.println("type == 1==========================="+type+annotation.value().name()+"========================");
+                        log.info("type == 1==========================="+type+annotation.value().name()+"========================");
                     }
                 }
-                System.out.println(annotation.value().name()+type);
+                log.info(annotation.value().name()+type);
             }else{
                 throw new RuntimeException("@TargetDataSource注解只能用于类或者方法上, 错误出现在:[" +
                         target.toString() +" " + method.toString() + "];");