diff --git a/pom.xml b/pom.xml
index 6949962..6182941 100644
--- a/pom.xml
+++ b/pom.xml
@@ -117,7 +117,7 @@
commons-codec
1.15
-
+
io.springfox
@@ -139,7 +139,7 @@
swagger-bootstrap-ui
${swagger-bootstrap-ui.version}
-
+
javax.validation
diff --git a/xfg-ddd-api/pom.xml b/xfg-ddd-api/pom.xml
index 3af20b1..3b64bf8 100644
--- a/xfg-ddd-api/pom.xml
+++ b/xfg-ddd-api/pom.xml
@@ -20,21 +20,11 @@
jakarta.validation-api
3.0.2
-
+
- com.fasterxml.jackson.core
- jackson-databind
- 2.13.4.2
-
-
- com.fasterxml.jackson.core
- jackson-core
- 2.13.4
-
-
- com.fasterxml.jackson.core
- jackson-annotations
- 2.13.4
+ com.in
+ xfg-ddd-types
+ ${project.version}
diff --git a/xfg-ddd-types/pom.xml b/xfg-ddd-types/pom.xml
index d03ffe9..7b9c9e6 100644
--- a/xfg-ddd-types/pom.xml
+++ b/xfg-ddd-types/pom.xml
@@ -30,6 +30,25 @@
org.apache.commons
commons-lang3
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+
+
+
+ cn.hutool
+ hutool-core
+ 5.8.20
+
diff --git a/xfg-ddd-types/src/main/java/com/in/types/common/utils/HutoolDemo.java b/xfg-ddd-types/src/main/java/com/in/types/common/utils/HutoolDemo.java
new file mode 100644
index 0000000..3e1f72a
--- /dev/null
+++ b/xfg-ddd-types/src/main/java/com/in/types/common/utils/HutoolDemo.java
@@ -0,0 +1,124 @@
+package com.in.types.common.utils;
+
+import cn.hutool.core.date.DateField;
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.lang.UUID;
+import cn.hutool.core.util.IdUtil;
+import cn.hutool.core.util.ReUtil;
+import cn.hutool.core.util.StrUtil;
+
+import java.util.Date;
+
+/**
+ * Hutool工具类使用示例
+ * 演示如何使用Hutool替代自定义的StringUtil和DateUtil
+ */
+public class HutoolDemo {
+
+ /**
+ * 字符串工具类示例(替代StringUtil)
+ */
+ public static void stringUtilDemo() {
+ // 判断字符串是否为空
+ boolean isEmpty = StrUtil.isEmpty(""); // true
+ boolean isNotEmpty = StrUtil.isNotEmpty("test"); // true
+ boolean isBlank = StrUtil.isBlank(" "); // true
+ boolean isNotBlank = StrUtil.isNotBlank("test"); // true
+
+ // 生成UUID
+ String uuid = UUID.fastUUID().toString(true); // 不带横线的UUID
+ String simpleUUID = IdUtil.simpleUUID(); // 不带横线的UUID
+
+ // 截取字符串
+ String sub = StrUtil.sub("abcdefg", 2, 5); // "cde"
+
+ // 首字母大小写转换
+ String capitalize = StrUtil.upperFirst("hello"); // "Hello"
+ String uncapitalize = StrUtil.lowerFirst("World"); // "world"
+
+ // 驼峰和下划线命名转换
+ String toCamelCase = StrUtil.toCamelCase("user_name"); // "userName"
+ String toUnderlineCase = StrUtil.toUnderlineCase("userName"); // "user_name"
+
+ // 正则匹配
+ boolean matches = ReUtil.isMatch("\\d+", "12345"); // true
+
+ // 字符串替换
+ String replaced = StrUtil.replace("hello world", "world", "hutool"); // "hello hutool"
+
+ System.out.println("===== String Util Demo =====");
+ System.out.println("isEmpty: " + isEmpty);
+ System.out.println("isNotEmpty: " + isNotEmpty);
+ System.out.println("isBlank: " + isBlank);
+ System.out.println("isNotBlank: " + isNotBlank);
+ System.out.println("UUID: " + uuid);
+ System.out.println("Simple UUID: " + simpleUUID);
+ System.out.println("Substring: " + sub);
+ System.out.println("Capitalize: " + capitalize);
+ System.out.println("Uncapitalize: " + uncapitalize);
+ System.out.println("ToCamelCase: " + toCamelCase);
+ System.out.println("ToUnderlineCase: " + toUnderlineCase);
+ System.out.println("Matches: " + matches);
+ System.out.println("Replace: " + replaced);
+ }
+
+ /**
+ * 日期工具类示例(替代DateUtil)
+ */
+ public static void dateUtilDemo() {
+ // 获取当前日期时间
+ DateTime now = DateUtil.date();
+
+ // 格式化日期
+ String formatDate = DateUtil.formatDate(now); // yyyy-MM-dd
+ String formatDateTime = DateUtil.formatDateTime(now); // yyyy-MM-dd HH:mm:ss
+ String formatTime = DateUtil.formatTime(now); // HH:mm:ss
+ String customFormat = DateUtil.format(now, "yyyy/MM/dd"); // 自定义格式
+
+ // 字符串转日期
+ Date date1 = DateUtil.parse("2023-05-20");
+ Date date2 = DateUtil.parse("2023-05-20 12:34:56", "yyyy-MM-dd HH:mm:ss");
+
+ // 日期计算
+ DateTime tomorrow = DateUtil.tomorrow();
+ DateTime yesterday = DateUtil.yesterday();
+ DateTime nextWeek = DateUtil.offsetWeek(now, 1);
+ DateTime nextMonth = DateUtil.offset(now, DateField.MONTH, 1);
+
+ // 获取日期部分
+ int year = DateUtil.year(now);
+ int month = DateUtil.month(now) + 1; // 返回值从0开始
+ int day = DateUtil.dayOfMonth(now);
+
+ // 日期比较
+ boolean isSameDay = DateUtil.isSameDay(now, tomorrow); // false
+ long betweenDays = DateUtil.betweenDay(now, nextMonth, true); // 日期相差天数
+
+ System.out.println("\n===== Date Util Demo =====");
+ System.out.println("Now: " + now);
+ System.out.println("Format Date: " + formatDate);
+ System.out.println("Format DateTime: " + formatDateTime);
+ System.out.println("Format Time: " + formatTime);
+ System.out.println("Custom Format: " + customFormat);
+ System.out.println("Parse Date1: " + date1);
+ System.out.println("Parse Date2: " + date2);
+ System.out.println("Tomorrow: " + tomorrow);
+ System.out.println("Yesterday: " + yesterday);
+ System.out.println("Next Week: " + nextWeek);
+ System.out.println("Next Month: " + nextMonth);
+ System.out.println("Year: " + year);
+ System.out.println("Month: " + month);
+ System.out.println("Day: " + day);
+ System.out.println("Is Same Day: " + isSameDay);
+ System.out.println("Between Days: " + betweenDays);
+ }
+
+ /**
+ * 主方法,运行所有示例
+ */
+ public static void main(String[] args) {
+ stringUtilDemo();
+ dateUtilDemo();
+ }
+}
\ No newline at end of file
diff --git a/xfg-ddd-api/src/main/java/com/in/api/util/JacksonUtil.java b/xfg-ddd-types/src/main/java/com/in/types/common/utils/JacksonUtil.java
similarity index 99%
rename from xfg-ddd-api/src/main/java/com/in/api/util/JacksonUtil.java
rename to xfg-ddd-types/src/main/java/com/in/types/common/utils/JacksonUtil.java
index 16f275c..5ba71ad 100644
--- a/xfg-ddd-api/src/main/java/com/in/api/util/JacksonUtil.java
+++ b/xfg-ddd-types/src/main/java/com/in/types/common/utils/JacksonUtil.java
@@ -1,4 +1,4 @@
-package com.in.api.util;
+package com.in.types.common.utils;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
diff --git a/xfg-ddd-types/src/main/java/com/in/types/common/utils/README.md b/xfg-ddd-types/src/main/java/com/in/types/common/utils/README.md
new file mode 100644
index 0000000..2fc11b8
--- /dev/null
+++ b/xfg-ddd-types/src/main/java/com/in/types/common/utils/README.md
@@ -0,0 +1,156 @@
+# DDD框架工具类
+
+本目录包含了DDD框架中使用的通用工具类,这些工具类被放置在共享内核(xfg-ddd-types)模块中,可以被所有其他模块使用。
+
+## 工具类列表
+
+### 1. JacksonUtil
+
+JSON处理工具类,用于对象与JSON字符串之间的转换。
+
+主要功能:
+- 对象转JSON字符串
+- JSON字符串转对象
+- JSON字符串转列表
+- JSON字符串转Map
+- 获取ObjectMapper实例
+
+示例用法:
+```java
+// 对象转JSON
+User user = new User(1L, "张三", 25);
+String json = JacksonUtil.bean2Json(user);
+
+// JSON转对象
+User parsedUser = JacksonUtil.json2Bean(json, User.class);
+
+// JSON转列表
+List userList = JacksonUtil.json2List(jsonArray, User.class);
+```
+
+### 2. Hutool工具类
+
+项目引入了Hutool核心工具类,用于替代自定义的StringUtil和DateUtil工具类。Hutool是一个小而全的Java工具类库,提供了丰富的功能。
+
+#### 2.1 字符串处理 (StrUtil)
+
+主要功能:
+- 判断字符串是否为空/空白
+- 生成UUID
+- 截取字符串
+- 首字母大小写转换
+- 驼峰命名与下划线命名转换
+
+示例用法:
+```java
+// 判断字符串是否为空
+boolean isEmpty = StrUtil.isEmpty(str);
+boolean isBlank = StrUtil.isBlank(str);
+
+// 生成UUID
+String uuid = UUID.fastUUID().toString(true);
+String simpleUUID = IdUtil.simpleUUID();
+
+// 驼峰命名转下划线
+String underlineCase = StrUtil.toUnderlineCase("userName"); // user_name
+String camelCase = StrUtil.toCamelCase("user_name"); // userName
+```
+
+#### 2.2 日期处理 (DateUtil)
+
+主要功能:
+- 获取当前日期/时间
+- 日期格式化与解析
+- 日期计算(增加/减少年月日时分秒)
+- 获取日期的年月日时分秒
+- 判断日期是否相同
+
+示例用法:
+```java
+// 获取当前日期时间
+DateTime now = DateUtil.date();
+
+// 格式化日期
+String formatDate = DateUtil.formatDate(now); // yyyy-MM-dd
+String formatTime = DateUtil.formatTime(now); // HH:mm:ss
+String formatDateTime = DateUtil.formatDateTime(now); // yyyy-MM-dd HH:mm:ss
+String customFormat = DateUtil.format(now, "yyyy/MM/dd"); // 自定义格式化
+
+// 解析日期
+Date date = DateUtil.parse("2023-05-20");
+Date dateTime = DateUtil.parse("2023-05-20 12:34:56", "yyyy-MM-dd HH:mm:ss");
+
+// 日期计算
+DateTime tomorrow = DateUtil.tomorrow();
+DateTime nextWeek = DateUtil.offsetWeek(now, 1);
+DateTime nextMonth = DateUtil.offset(now, DateField.MONTH, 1);
+
+// 日期比较
+boolean isSameDay = DateUtil.isSameDay(now, tomorrow);
+long betweenDays = DateUtil.betweenDay(now, nextMonth, true);
+```
+
+#### 2.3 正则表达式 (ReUtil)
+
+主要功能:
+- 正则表达式匹配
+- 正则表达式提取
+- 正则表达式替换
+
+示例用法:
+```java
+// 正则表达式匹配
+boolean isMatch = ReUtil.isMatch("\\d+", "12345");
+
+// 正则表达式提取
+String result = ReUtil.get("\\d+", "abc123def", 0); // 123
+
+// 正则表达式替换
+String replaced = ReUtil.replaceAll("hello world", "world", "hutool"); // hello hutool
+```
+
+## 使用说明
+
+1. 在需要使用工具类的模块中,添加对xfg-ddd-types模块的依赖:
+```xml
+
+ com.in
+ xfg-ddd-types
+ ${project.version}
+
+```
+
+2. 在代码中导入需要的工具类:
+```java
+// 使用JacksonUtil
+import com.in.types.common.utils.JacksonUtil;
+
+// 使用Hutool工具类
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.date.DateField;
+import cn.hutool.core.util.ReUtil;
+import cn.hutool.core.lang.UUID;
+import cn.hutool.core.util.IdUtil;
+```
+
+3. 查看具体用法示例:
+```java
+import com.in.types.common.utils.HutoolDemo;
+
+// 运行示例代码
+HutoolDemo.stringUtilDemo();
+HutoolDemo.dateUtilDemo();
+```
+
+## 注意事项
+
+1. 工具类都是无状态的,所有方法都是静态方法,可以直接调用。
+2. 如需了解更多Hutool工具类的功能,请参考[Hutool官方文档](https://hutool.cn/docs)。
+3. 如果需要添加新的工具类,请遵循以下原则:
+ - 优先考虑使用Hutool提供的工具类
+ - 自定义工具类应该是无状态的,所有方法都应该是静态方法
+ - 工具类应该有详细的JavaDoc注释
+ - 工具类应该放在com.in.types.common.utils包下
+ - 工具类名称应该以Util结尾
\ No newline at end of file