diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/keygen/MybatisKeyGeneratorUtil.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/keygen/MybatisKeyGeneratorUtil.java index f258461a..2b9dfbf4 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/keygen/MybatisKeyGeneratorUtil.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/keygen/MybatisKeyGeneratorUtil.java @@ -62,7 +62,7 @@ public class MybatisKeyGeneratorUtil { return NoKeyGenerator.INSTANCE; } - FlexGlobalConfig.KeyConfig globalKeyConfig = FlexGlobalConfig.getConfig(ms.getConfiguration()).getKeyConfig(); + FlexGlobalConfig.KeyConfig globalKeyConfig = flexGlobalConfig.getKeyConfig(); KeyType keyType = getKeyType(idInfo, globalKeyConfig); if (keyType == null || keyType == KeyType.None) { diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/mybatis/MapperInvocationHandler.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/mybatis/MapperInvocationHandler.java index e52d4256..63636dc0 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/mybatis/MapperInvocationHandler.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/mybatis/MapperInvocationHandler.java @@ -33,6 +33,7 @@ import java.lang.reflect.Method; /** * @author michael + * @author norkts */ public class MapperInvocationHandler implements InvocationHandler { @@ -41,12 +42,11 @@ public class MapperInvocationHandler implements InvocationHandler { public MapperInvocationHandler(Object mapper, DataSource dataSource) { this.mapper = mapper; - if(dataSource instanceof FlexDataSource){ + if (dataSource instanceof FlexDataSource) { this.dataSource = (FlexDataSource) dataSource; - }else{ + } else { this.dataSource = null; } - }