!340 codegen配置类实现Serializable接口

Merge pull request !340 from zoufang162/main
This commit is contained in:
Michael Yang 2023-09-12 14:29:14 +00:00 committed by Gitee
commit 5bcb63ab1f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
13 changed files with 50 additions and 17 deletions

View File

@ -15,6 +15,8 @@
*/ */
package com.mybatisflex.codegen.config; package com.mybatisflex.codegen.config;
import java.io.Serializable;
/** /**
* 生成 Controller 的配置 * 生成 Controller 的配置
* *
@ -22,8 +24,9 @@ package com.mybatisflex.codegen.config;
* @since 2023-05-15 * @since 2023-05-15
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class ControllerConfig { public class ControllerConfig implements Serializable {
private static final long serialVersionUID = 8391630904705910611L;
/** /**
* Controller 类的前缀 * Controller 类的前缀
*/ */

View File

@ -24,8 +24,9 @@ import java.io.Serializable;
* @since 2023-05-15 * @since 2023-05-15
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class EntityConfig { public class EntityConfig implements Serializable {
private static final long serialVersionUID = -6790274333595436008L;
/** /**
* Entity 类的前缀 * Entity 类的前缀
*/ */

View File

@ -17,6 +17,7 @@ package com.mybatisflex.codegen.config;
import com.mybatisflex.codegen.template.ITemplate; import com.mybatisflex.codegen.template.ITemplate;
import java.io.Serializable;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
@ -32,7 +33,8 @@ import java.util.function.UnaryOperator;
* @since 2023-05-15 * @since 2023-05-15
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class GlobalConfig { public class GlobalConfig implements Serializable {
private static final long serialVersionUID = 5033600623041298000L;
// === 必须配置 === // === 必须配置 ===

View File

@ -18,6 +18,7 @@ package com.mybatisflex.codegen.config;
import com.mybatisflex.core.util.StringUtil; import com.mybatisflex.core.util.StringUtil;
import java.io.Serializable;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.function.Function; import java.util.function.Function;
@ -31,8 +32,9 @@ import java.util.function.UnaryOperator;
* @since 2023-05-17 * @since 2023-05-17
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class JavadocConfig { public class JavadocConfig implements Serializable {
private static final long serialVersionUID = -4280345489968397327L;
/** /**
* 作者 * 作者
*/ */

View File

@ -17,6 +17,8 @@ package com.mybatisflex.codegen.config;
import com.mybatisflex.core.BaseMapper; import com.mybatisflex.core.BaseMapper;
import java.io.Serializable;
/** /**
* 生成 Mapper 的配置 * 生成 Mapper 的配置
* *
@ -24,8 +26,9 @@ import com.mybatisflex.core.BaseMapper;
* @since 2023-05-15 * @since 2023-05-15
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class MapperConfig { public class MapperConfig implements Serializable {
private static final long serialVersionUID = 1937442008907641534L;
/** /**
* Mapper 类的前缀 * Mapper 类的前缀
*/ */

View File

@ -16,6 +16,8 @@
package com.mybatisflex.codegen.config; package com.mybatisflex.codegen.config;
import java.io.Serializable;
/** /**
* 生成 MapperXml 的配置 * 生成 MapperXml 的配置
* *
@ -23,8 +25,9 @@ package com.mybatisflex.codegen.config;
* @since 2023-05-17 * @since 2023-05-17
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class MapperXmlConfig { public class MapperXmlConfig implements Serializable {
private static final long serialVersionUID = 7836897652282634412L;
/** /**
* MapperXml 文件的前缀 * MapperXml 文件的前缀
*/ */

View File

@ -18,6 +18,8 @@ package com.mybatisflex.codegen.config;
import com.mybatisflex.core.util.StringUtil; import com.mybatisflex.core.util.StringUtil;
import java.io.Serializable;
/** /**
* 生成软件包的配置 * 生成软件包的配置
* *
@ -25,8 +27,9 @@ import com.mybatisflex.core.util.StringUtil;
* @since 2023-05-15 * @since 2023-05-15
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class PackageConfig { public class PackageConfig implements Serializable {
private static final long serialVersionUID = -8257632247633439537L;
/** /**
* 代码生成目录 * 代码生成目录
*/ */

View File

@ -18,6 +18,8 @@ package com.mybatisflex.codegen.config;
import com.mybatisflex.core.service.IService; import com.mybatisflex.core.service.IService;
import java.io.Serializable;
/** /**
* 生成 Service 的配置 * 生成 Service 的配置
* *
@ -25,8 +27,9 @@ import com.mybatisflex.core.service.IService;
* @since 2023-05-15 * @since 2023-05-15
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class ServiceConfig { public class ServiceConfig implements Serializable {
private static final long serialVersionUID = -2152473328300910220L;
/** /**
* Service 类的前缀 * Service 类的前缀
*/ */

View File

@ -15,6 +15,8 @@
*/ */
package com.mybatisflex.codegen.config; package com.mybatisflex.codegen.config;
import java.io.Serializable;
/** /**
* 生成 ServiceImpl 的配置 * 生成 ServiceImpl 的配置
* *
@ -22,8 +24,9 @@ package com.mybatisflex.codegen.config;
* @since 2023-05-15 * @since 2023-05-15
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class ServiceImplConfig { public class ServiceImplConfig implements Serializable {
private static final long serialVersionUID = 17115432462168151L;
/** /**
* ServiceImpl 类的前缀 * ServiceImpl 类的前缀
*/ */

View File

@ -18,6 +18,7 @@ package com.mybatisflex.codegen.config;
import com.mybatisflex.core.util.StringUtil; import com.mybatisflex.core.util.StringUtil;
import java.io.Serializable;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Map; import java.util.Map;
@ -30,8 +31,9 @@ import java.util.Set;
* @since 2023-05-14 * @since 2023-05-14
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class StrategyConfig { public class StrategyConfig implements Serializable {
private static final long serialVersionUID = 504853587703061034L;
/** /**
* 数据库表前缀多个前缀用英文逗号, 隔开 * 数据库表前缀多个前缀用英文逗号, 隔开
*/ */

View File

@ -19,6 +19,7 @@ import com.mybatisflex.annotation.InsertListener;
import com.mybatisflex.annotation.SetListener; import com.mybatisflex.annotation.SetListener;
import com.mybatisflex.annotation.UpdateListener; import com.mybatisflex.annotation.UpdateListener;
import java.io.Serializable;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
@ -26,9 +27,10 @@ import java.util.Map;
* 表的单独设置 * 表的单独设置
*/ */
@SuppressWarnings({"unused", "UnusedReturnValue"}) @SuppressWarnings({"unused", "UnusedReturnValue"})
public class TableConfig { public class TableConfig implements Serializable {
public static final String ALL_TABLES = "*"; public static final String ALL_TABLES = "*";
private static final long serialVersionUID = -2568968178699265858L;
/** /**
* 数据库的 schema模式 * 数据库的 schema模式

View File

@ -17,6 +17,8 @@ package com.mybatisflex.codegen.config;
import com.mybatisflex.core.util.StringUtil; import com.mybatisflex.core.util.StringUtil;
import java.io.Serializable;
/** /**
* 生成 TableDef 的配置 * 生成 TableDef 的配置
* *
@ -24,8 +26,9 @@ import com.mybatisflex.core.util.StringUtil;
* @since 2023-05-15 * @since 2023-05-15
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class TableDefConfig { public class TableDefConfig implements Serializable {
private static final long serialVersionUID = 8137903163796008036L;
/** /**
* TableDef 类的前缀 * TableDef 类的前缀
*/ */

View File

@ -20,6 +20,8 @@ import com.mybatisflex.codegen.generator.GeneratorFactory;
import com.mybatisflex.codegen.template.ITemplate; import com.mybatisflex.codegen.template.ITemplate;
import com.mybatisflex.codegen.template.impl.EnjoyTemplate; import com.mybatisflex.codegen.template.impl.EnjoyTemplate;
import java.io.Serializable;
/** /**
* 模板配置 * 模板配置
* *
@ -27,8 +29,9 @@ import com.mybatisflex.codegen.template.impl.EnjoyTemplate;
* @since 2023-05-17 * @since 2023-05-17
*/ */
@SuppressWarnings("unused") @SuppressWarnings("unused")
public class TemplateConfig { public class TemplateConfig implements Serializable {
private static final long serialVersionUID = 6700855804948021101L;
/** /**
* 生成代码的模板引擎 * 生成代码的模板引擎
*/ */