diff --git a/dolphin-commons/dolphin-common-mybatis/pom.xml b/dolphin-commons/dolphin-common-mybatis/pom.xml
new file mode 100644
index 0000000..739927e
--- /dev/null
+++ b/dolphin-commons/dolphin-common-mybatis/pom.xml
@@ -0,0 +1,50 @@
+
+
+ 4.0.0
+
+ day.gitlab
+ dolphin-commons
+ 0.0.1-SNAPSHOT
+
+
+ dolphin-common-mybatis
+ jar
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ com.mybatis-flex
+ mybatis-flex-spring-boot3-starter
+
+
+ cn.hutool.v7
+ hutool-all
+
+
+ org.projectlombok
+ lombok
+ true
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+
+ org.projectlombok
+ lombok
+
+
+
+
+
+
+
diff --git a/dolphin-commons/dolphin-common-mybatis/src/main/java/day/gitlab/dolphin/common/mybatis/MyBatisFlexConfiguration.java b/dolphin-commons/dolphin-common-mybatis/src/main/java/day/gitlab/dolphin/common/mybatis/MyBatisFlexConfiguration.java
new file mode 100644
index 0000000..6b67e68
--- /dev/null
+++ b/dolphin-commons/dolphin-common-mybatis/src/main/java/day/gitlab/dolphin/common/mybatis/MyBatisFlexConfiguration.java
@@ -0,0 +1,30 @@
+package day.gitlab.dolphin.common.mybatis;
+
+import com.mybatisflex.annotation.KeyType;
+import com.mybatisflex.core.FlexGlobalConfig;
+import com.mybatisflex.core.audit.AuditManager;
+import com.mybatisflex.core.keygen.KeyGeneratorFactory;
+import com.mybatisflex.spring.boot.MyBatisFlexCustomizer;
+import jakarta.annotation.Resource;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class MyBatisFlexConfiguration implements MyBatisFlexCustomizer {
+
+ @Resource
+ private UUIDv7KeyGenerator uuidv7KeyGenerator;
+
+ @Override
+ public void customize(FlexGlobalConfig flexGlobalConfig) {
+ KeyGeneratorFactory.register("uuidv7", uuidv7KeyGenerator);
+
+ // 设置默认主键类型
+ FlexGlobalConfig.KeyConfig keyConfig = new FlexGlobalConfig.KeyConfig();
+ keyConfig.setKeyType(KeyType.Generator);
+ keyConfig.setValue("uuidv7");
+ keyConfig.setBefore(true);
+ flexGlobalConfig.setKeyConfig(keyConfig);
+
+ AuditManager.setAuditEnable(true);
+ }
+}
diff --git a/dolphin-commons/dolphin-common-mybatis/src/main/java/day/gitlab/dolphin/common/mybatis/UUIDv7KeyGenerator.java b/dolphin-commons/dolphin-common-mybatis/src/main/java/day/gitlab/dolphin/common/mybatis/UUIDv7KeyGenerator.java
new file mode 100644
index 0000000..018fca0
--- /dev/null
+++ b/dolphin-commons/dolphin-common-mybatis/src/main/java/day/gitlab/dolphin/common/mybatis/UUIDv7KeyGenerator.java
@@ -0,0 +1,14 @@
+package day.gitlab.dolphin.common.mybatis;
+
+import cn.hutool.v7.core.data.id.IdUtil;
+import com.mybatisflex.core.keygen.IKeyGenerator;
+import org.springframework.stereotype.Component;
+
+@Component
+public class UUIDv7KeyGenerator implements IKeyGenerator {
+
+ @Override
+ public Object generate(Object entity, String keyColumn) {
+ return IdUtil.randomUUID7();
+ }
+}
diff --git a/dolphin-commons/pom.xml b/dolphin-commons/pom.xml
index 668ac46..7cbd690 100644
--- a/dolphin-commons/pom.xml
+++ b/dolphin-commons/pom.xml
@@ -13,6 +13,7 @@
dolphin-common-core
+ dolphin-common-mybatis
dolphin-common-security
diff --git a/dolphin-modules/dolphin-module-core/pom.xml b/dolphin-modules/dolphin-module-core/pom.xml
new file mode 100644
index 0000000..a999b5b
--- /dev/null
+++ b/dolphin-modules/dolphin-module-core/pom.xml
@@ -0,0 +1,62 @@
+
+
+ 4.0.0
+
+ day.gitlab
+ dolphin-modules
+ 0.0.1-SNAPSHOT
+
+
+ dolphin-module-core
+ jar
+
+
+
+ day.gitlab
+ dolphin-common-security
+ ${project.version}
+
+
+ day.gitlab
+ dolphin-common-mybatis
+ ${project.version}
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-jdbc
+
+
+ com.mybatis-flex
+ mybatis-flex-spring-boot3-starter
+
+
+
+ org.projectlombok
+ lombok
+ true
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+
+ org.projectlombok
+ lombok
+
+
+
+
+
+
+
diff --git a/dolphin-modules/dolphin-module-rbac/pom.xml b/dolphin-modules/dolphin-module-rbac/pom.xml
index 5d3e340..41c2064 100644
--- a/dolphin-modules/dolphin-module-rbac/pom.xml
+++ b/dolphin-modules/dolphin-module-rbac/pom.xml
@@ -14,24 +14,10 @@
day.gitlab
- dolphin-common-security
+ dolphin-module-core
${project.version}
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.boot
- spring-boot-starter-jdbc
-
-
-
- com.mybatis-flex
- mybatis-flex-spring-boot3-starter
-
-
org.projectlombok
lombok
diff --git a/dolphin-modules/pom.xml b/dolphin-modules/pom.xml
index eb634fb..4fa272e 100644
--- a/dolphin-modules/pom.xml
+++ b/dolphin-modules/pom.xml
@@ -12,6 +12,7 @@
pom
+ dolphin-module-core
dolphin-module-rbac
diff --git a/pom.xml b/pom.xml
index b9d260c..931d73b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,6 +14,7 @@
3.5.8
1.11.4
0.13.0
+ 7.0.0-M2
@@ -58,45 +59,13 @@
${jjwt.version}
runtime
+
+
+ cn.hutool.v7
+ hutool-all
+ ${hutool-v7.version}
+
-