Jelajahi Sumber

Support databaseId .

https://github.com/baomidou/mybatis-plus/issues/5746
nieqiurong 1 tahun lalu
induk
melakukan
44575af46e

+ 1 - 1
gradle.properties

@@ -1,4 +1,4 @@
-APP_VERSION=3.5.4.1
+APP_VERSION=3.5.5-SNAPSHOT
 APP_GROUP=com.baomidou
 signing.keyId=1FD337F9
 signing.password=243194995

+ 3 - 0
spring-boot-starter/mybatis-plus-spring-boot-autoconfigure/src/main/java/com/baomidou/mybatisplus/autoconfigure/MybatisPlusProperties.java

@@ -338,6 +338,8 @@ public class MybatisPlusProperties {
         // 新增兼容开始...
         private Class<? extends LanguageDriver> defaultScriptingLanguageDriver;
 
+        protected String databaseId;
+
         public void applyTo(Configuration target) {
             PropertyMapper mapper = PropertyMapper.get().alwaysApplyingWhenNonNull();
             mapper.from(getSafeRowBoundsEnabled()).to(target::setSafeRowBoundsEnabled);
@@ -372,6 +374,7 @@ public class MybatisPlusProperties {
             mapper.from(getConfigurationFactory()).to(target::setConfigurationFactory);
             mapper.from(getDefaultEnumTypeHandler()).to(target::setDefaultEnumTypeHandler);
             mapper.from(getDefaultScriptingLanguageDriver()).to(target::setDefaultScriptingLanguage);
+            mapper.from(getDatabaseId()).to(target::setDatabaseId);
         }
     }