From 17f8047da0eff5fffeeca4581d6ea93e0967df29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E8=BD=A9?= <8813596+mx990420@user.noreply.gitee.com> Date: Wed, 24 Sep 2025 02:43:31 +0000 Subject: [PATCH] =?UTF-8?q?IdTypeEnvironmentPostProcessor.java.=20?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 墨轩 <8813596+mx990420@user.noreply.gitee.com> --- .../mybatis/config/IdTypeEnvironmentPostProcessor.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/config/IdTypeEnvironmentPostProcessor.java b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/config/IdTypeEnvironmentPostProcessor.java index bb79410da..70d2438a3 100644 --- a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/config/IdTypeEnvironmentPostProcessor.java +++ b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/config/IdTypeEnvironmentPostProcessor.java @@ -59,20 +59,16 @@ public class IdTypeEnvironmentPostProcessor implements EnvironmentPostProcessor } public IdType getIdType(ConfigurableEnvironment environment) { - // return environment.getProperty(ID_TYPE_KEY, IdType.class); String value = environment.getProperty(ID_TYPE_KEY); try { return StrUtil.isNotBlank(value) ? IdType.valueOf(value) : IdType.NONE; } catch (IllegalArgumentException ex) { - log.error("无法解析 id-type 配置值:{}", value, ex); + log.error("[getIdType][无法解析 id-type 配置值({})]", value, ex) return IdType.NONE; } - } public void setIdType(ConfigurableEnvironment environment, IdType idType) { - // environment.getSystemProperties().put(ID_TYPE_KEY, idType); - // log.info("[setIdType][修改 MyBatis Plus 的 idType 为({})]", idType); Map map = new HashMap<>(); map.put(ID_TYPE_KEY, idType); environment.getPropertySources().addFirst(new MapPropertySource("mybatisPlusIdType", map));