Explorar el Código

修复多数据源切换时的NPE

NorthLan hace 7 años
padre
commit
cb6a94baaa

+ 1 - 1
zen-orm/src/main/kotlin/com/gxzc/zen/orm/aop/DataSourceSwitchAspect.kt

@@ -67,7 +67,7 @@ class DataSourceSwitchAspect {
     @Before("zenMapperPointCut() || mpMapperPointCut()")
     fun dynamicDataSource(joinPoint: JoinPoint) {
         logger.trace("*Mapper aspect...")
-        if (isAnnotationAspect.get()) {
+        if (isAnnotationAspect.get() != null && isAnnotationAspect.get()) {
             return
         }
         val target = joinPoint.target