diff --git a/mybatis-flex-codegen/src/main/java/com/mybatisflex/codegen/config/ColumnConfigFactory.java b/mybatis-flex-codegen/src/main/java/com/mybatisflex/codegen/config/ColumnConfigFactory.java new file mode 100644 index 00000000..c0bce35b --- /dev/null +++ b/mybatis-flex-codegen/src/main/java/com/mybatisflex/codegen/config/ColumnConfigFactory.java @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2022-2025, Mybatis-Flex (fuhai999@gmail.com). + *
+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *
+ * http://www.apache.org/licenses/LICENSE-2.0 + *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.mybatisflex.codegen.config;
+
+public interface ColumnConfigFactory {
+
+ ColumnConfig getColumnConfig(String tableName, String columnName);
+}
diff --git a/mybatis-flex-codegen/src/main/java/com/mybatisflex/codegen/config/GlobalConfig.java b/mybatis-flex-codegen/src/main/java/com/mybatisflex/codegen/config/GlobalConfig.java
index 7c994443..1c99efbb 100644
--- a/mybatis-flex-codegen/src/main/java/com/mybatisflex/codegen/config/GlobalConfig.java
+++ b/mybatis-flex-codegen/src/main/java/com/mybatisflex/codegen/config/GlobalConfig.java
@@ -670,6 +670,14 @@ public class GlobalConfig implements Serializable {
return getStrategyConfig().getColumnConfig(tableName, columnName);
}
+ public ColumnConfigFactory getColumnConfigFactory() {
+ return getStrategyConfig().getColumnConfigFactory();
+ }
+
+ public void setColumnConfigFactory(ColumnConfigFactory columnConfigFactory) {
+ getStrategyConfig().setColumnConfigFactory(columnConfigFactory);
+ }
+
/**
* @see StrategyConfig#isGenerateForView()
*/
diff --git a/mybatis-flex-codegen/src/main/java/com/mybatisflex/codegen/config/StrategyConfig.java b/mybatis-flex-codegen/src/main/java/com/mybatisflex/codegen/config/StrategyConfig.java
index 13b2581b..25973551 100644
--- a/mybatis-flex-codegen/src/main/java/com/mybatisflex/codegen/config/StrategyConfig.java
+++ b/mybatis-flex-codegen/src/main/java/com/mybatisflex/codegen/config/StrategyConfig.java
@@ -70,6 +70,11 @@ public class StrategyConfig implements Serializable {
*/
private Map