diff --git a/pom.xml b/pom.xml
index 3e5289c14..7ac446dba 100644
--- a/pom.xml
+++ b/pom.xml
@@ -183,6 +183,13 @@
test
+
+ com.github.fppt
+ jedis-mock
+ 0.1.16
+ test
+
+
org.projectlombok
diff --git a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/InfConfigController.java b/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/InfConfigController.java
index 05549b3c2..fc39d9431 100644
--- a/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/InfConfigController.java
+++ b/src/main/java/cn/iocoder/dashboard/modules/infra/controller/config/InfConfigController.java
@@ -13,7 +13,6 @@ import cn.iocoder.dashboard.modules.infra.service.config.InfConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -30,19 +29,6 @@ import static cn.iocoder.dashboard.modules.infra.enums.InfErrorCodeConstants.CON
@RequestMapping("/infra/config")
public class InfConfigController {
- @Value("${demo.test}")
- private String demo;
-
- @GetMapping("/demo")
- public String demo() {
- return demo;
- }
-
- @PostMapping("/demo")
- public void setDemo() {
-
- }
-
@Resource
private InfConfigService configService;
diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/coegen/ToolCodegenColumnMapper.java b/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolCodegenColumnMapper.java
similarity index 92%
rename from src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/coegen/ToolCodegenColumnMapper.java
rename to src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolCodegenColumnMapper.java
index 0539e13e6..e7fa43317 100644
--- a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/coegen/ToolCodegenColumnMapper.java
+++ b/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolCodegenColumnMapper.java
@@ -1,4 +1,4 @@
-package cn.iocoder.dashboard.modules.tool.dal.mysql.coegen;
+package cn.iocoder.dashboard.modules.tool.dal.mysql.codegen;
import cn.iocoder.dashboard.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolCodegenColumnDO;
diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/coegen/ToolCodegenTableMapper.java b/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolCodegenTableMapper.java
similarity index 95%
rename from src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/coegen/ToolCodegenTableMapper.java
rename to src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolCodegenTableMapper.java
index 8c47db62e..52ce76f2b 100644
--- a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/coegen/ToolCodegenTableMapper.java
+++ b/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolCodegenTableMapper.java
@@ -1,4 +1,4 @@
-package cn.iocoder.dashboard.modules.tool.dal.mysql.coegen;
+package cn.iocoder.dashboard.modules.tool.dal.mysql.codegen;
import cn.iocoder.dashboard.common.pojo.PageResult;
import cn.iocoder.dashboard.framework.mybatis.core.mapper.BaseMapperX;
diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/coegen/ToolSchemaColumnMapper.java b/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolSchemaColumnMapper.java
similarity index 90%
rename from src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/coegen/ToolSchemaColumnMapper.java
rename to src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolSchemaColumnMapper.java
index a891e75db..438168bc4 100644
--- a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/coegen/ToolSchemaColumnMapper.java
+++ b/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolSchemaColumnMapper.java
@@ -1,4 +1,4 @@
-package cn.iocoder.dashboard.modules.tool.dal.mysql.coegen;
+package cn.iocoder.dashboard.modules.tool.dal.mysql.codegen;
import cn.iocoder.dashboard.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolSchemaColumnDO;
diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/coegen/ToolSchemaTableMapper.java b/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolSchemaTableMapper.java
similarity index 95%
rename from src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/coegen/ToolSchemaTableMapper.java
rename to src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolSchemaTableMapper.java
index 6b1dbf370..20a775272 100644
--- a/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/coegen/ToolSchemaTableMapper.java
+++ b/src/main/java/cn/iocoder/dashboard/modules/tool/dal/mysql/codegen/ToolSchemaTableMapper.java
@@ -1,4 +1,4 @@
-package cn.iocoder.dashboard.modules.tool.dal.mysql.coegen;
+package cn.iocoder.dashboard.modules.tool.dal.mysql.codegen;
import cn.iocoder.dashboard.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.dashboard.framework.mybatis.core.query.QueryWrapperX;
diff --git a/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java b/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java
index b93f628a4..6b2b5f9f7 100644
--- a/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java
+++ b/src/main/java/cn/iocoder/dashboard/modules/tool/service/codegen/impl/ToolCodegenServiceImpl.java
@@ -10,10 +10,10 @@ import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolCodegenColum
import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolCodegenTableDO;
import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolSchemaColumnDO;
import cn.iocoder.dashboard.modules.tool.dal.dataobject.codegen.ToolSchemaTableDO;
-import cn.iocoder.dashboard.modules.tool.dal.mysql.coegen.ToolCodegenColumnMapper;
-import cn.iocoder.dashboard.modules.tool.dal.mysql.coegen.ToolCodegenTableMapper;
-import cn.iocoder.dashboard.modules.tool.dal.mysql.coegen.ToolSchemaColumnMapper;
-import cn.iocoder.dashboard.modules.tool.dal.mysql.coegen.ToolSchemaTableMapper;
+import cn.iocoder.dashboard.modules.tool.dal.mysql.codegen.ToolCodegenColumnMapper;
+import cn.iocoder.dashboard.modules.tool.dal.mysql.codegen.ToolCodegenTableMapper;
+import cn.iocoder.dashboard.modules.tool.dal.mysql.codegen.ToolSchemaColumnMapper;
+import cn.iocoder.dashboard.modules.tool.dal.mysql.codegen.ToolSchemaTableMapper;
import cn.iocoder.dashboard.modules.tool.enums.codegen.ToolCodegenImportTypeEnum;
import cn.iocoder.dashboard.modules.tool.service.codegen.ToolCodegenService;
import cn.iocoder.dashboard.util.collection.CollectionUtils;
diff --git a/src/test/java/cn/iocoder/dashboard/BaseSpringBootUnitTest.java b/src/test/java/cn/iocoder/dashboard/BaseSpringBootUnitTest.java
new file mode 100644
index 000000000..fa75d3533
--- /dev/null
+++ b/src/test/java/cn/iocoder/dashboard/BaseSpringBootUnitTest.java
@@ -0,0 +1,31 @@
+package cn.iocoder.dashboard;
+
+import org.junit.jupiter.api.AfterEach;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.data.redis.core.RedisCallback;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.jdbc.Sql;
+
+import javax.annotation.Resource;
+
+@SpringBootTest
+@ActiveProfiles("unit-test") // 设置使用 application-unit-test 配置文件
+@Sql(scripts = "/sql/clean.sql", executionPhase = Sql.ExecutionPhase.AFTER_TEST_METHOD) // 每个单元测试结束后,清理 DB
+public class BaseSpringBootUnitTest {
+
+ @Resource
+ private StringRedisTemplate stringRedisTemplate;
+
+ /**
+ * 每个单元测试结束后,清理 Redis
+ */
+ @AfterEach
+ public void cleanRedis() {
+ stringRedisTemplate.execute((RedisCallback