From 02f6492d5b7c84ceed65b9dc7f45f97acae02e0b Mon Sep 17 00:00:00 2001 From: wcc <1842281311@qq.com> Date: Wed, 25 Dec 2024 12:57:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=88=9B=E5=BB=BA=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=20MybatisFlexBootstrap=20=E5=AE=9E=E4=BE=8B=E6=97=B6?= =?UTF-8?q?=EF=BC=8CFlexGlobalConfig.getConfig(environmentId)=20=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E7=9A=84=20config=20=E6=B0=B8=E8=BF=9C=E6=98=AF=20def?= =?UTF-8?q?aultConfig=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When creating multiple MybatisFlexBootstrap instances, the config obtained by FlexGlobalConfig.getConfig(environmentId) is always defaultConfig. --- .../src/main/java/com/mybatisflex/core/FlexGlobalConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/FlexGlobalConfig.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/FlexGlobalConfig.java index 3bf15c91..3dc26379 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/FlexGlobalConfig.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/FlexGlobalConfig.java @@ -423,7 +423,7 @@ public class FlexGlobalConfig { defaultConfig.setConfiguration(config.configuration); } - globalConfigs.put(id, isDefault ? defaultConfig : config); + globalConfigs.put(id, config); } }