Skip to content

Commit 5a4a207

Browse files
authored
🚀 [release] 0.0.17
🚀 [release] 0.0.17
2 parents 464856a + 6d49444 commit 5a4a207

File tree

7 files changed

+44
-36
lines changed

7 files changed

+44
-36
lines changed

docs/GLOBAL_CLAUDE.md

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@
22

33
This file provides guidance to Claude Code (claude.ai/code) when working with code in this Repository.
44

5-
**框架概述:** Compose Server 是现代化、模块化的 Kotlin 企业级开发框架(非脚手架),通过 Gradle 多模块提供企业级 SDK。所有模块可独立集成到任意 Spring Boot 或其他 JVM 项目中。
6-
7-
**技术栈:** Kotlin 2.2.0, Spring Boot 3.5.3, Spring Framework 6.2.6, Jimmer 0.9.101, Gradle 9.0.0-rc-4, Java 24, PostgreSQL, Redis, Caffeine, MinIO, LangChain4j。
8-
95
# 通用标准
106

117
**强制规则**
128

13-
1. 始终使用**简体中文**回复,即使用户输入大量英文提示,也应返回中文
9+
1. 始终使用**英语**回复,即使用户输入大量中文提示,也应返回英文
1410
2. 禁止编写任何供用户使用的示例代码,即使需要临时测试,任务完成后也必须立即删除
1511
3. 严禁通过简化问题来解决问题
1612
4. 严禁通过降级依赖版本来解决问题
@@ -41,9 +37,10 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4137
3. 独立运行,无外部依赖
4238
4. 测试命名清晰表达意图
4339
5. 测试类与被测试类同名
44-
7. **嵌套测试组织**:使用合适的分组,避免根级别大量独立测试方法
40+
6. **嵌套测试组织**:使用合适的分组,避免根级别大量独立测试方法
4541

4642
**测试组织最佳实践:**
43+
4744
- 每个被测试类/函数/变量/方法创建主要分组
4845
- 按场景细分:正常用例、异常用例、边界用例
4946
- 示例kotlin:`@Nested inner class CreateUser { @Test fun should_create_successfully() {} }`
@@ -84,13 +81,16 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
8481
2. 避免!!操作符,使用?.或let{}
8582
3. 数据类替代多参数函数
8683
4. 严禁使用 `println` 记录输出
84+
5. 严禁在单元测试中使用 `mockito`,而是使用 `mockk`
8785

8886
**TypeScript 和 Vue 标准**
8987

9088
- TypeScript: 启用strict模式,避免any类型
9189
- Vue: 积极使用 vue3 新特性
9290

91+
**SCSS 标准**
9392

93+
- 禁止使用 `@import`,使用 `@use` 代替
9494

9595
# Git 提交规范
9696

@@ -106,39 +106,40 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
106106

107107
## 表情符号规范
108108

109-
| 表情符号 | 类型 | 描述 | 使用场景 |
110-
|---------|------|------|----------|
111-
| 🎉 | feat | 重大功能/初始化 | 新功能、重大更新、项目初始化 |
112-
|| feat | 新功能/增强 | 添加功能、增强、文档更新 |
113-
| 🐛 | fix | Bug 修复 | 修复错误、解决问题 |
114-
| 🔧 | config | 配置修改 | 配置文件、CI/CD、构建配置 |
115-
| 📝 | docs | 文档更新 | 更新文档、README、注释 |
116-
| 🎨 | style | 代码风格/格式化 | 代码格式化、样式、结构优化 |
117-
| ♻️ | refactor | 重构 | 代码重构、包结构调整 |
118-
|| perf | 性能优化 | 性能优化、算法改进 |
119-
| 🔥 | remove | 删除代码/文件 | 删除无用代码、移除功能 |
120-
| 🧪 | test | 测试相关 | 添加测试、修复测试、测试配置 |
121-
| 👷 | ci | CI/CD | 持续集成、构建脚本 |
122-
| 📦 | build | 构建系统 | 依赖管理、构建配置 |
123-
| ⬆️ | upgrade | 升级依赖 | 升级库版本 |
124-
| ⬇️ | downgrade | 降级依赖 | 降级库版本 |
125-
| 🚀 | release | 发布版本 | 版本发布、标签创建 |
126-
| 🔀 | merge | 合并分支 | 分支合并、冲突解决 |
127-
| 🤖 | ai | AI 工具配置 | AI 助手配置、自动化 |
128-
| 💄 | optimize | 优化 | 性能优化、代码改进 |
129-
| 🌐 | network | 网络相关 | 网络配置、API 调用、远程服务 |
130-
| 🔐 | security | 安全/验证 | 安全修复、权限控制、验证 |
131-
| 🚑 | hotfix | 紧急修复 | 紧急修复、临时解决方案 |
132-
| 📈 | analytics | 分析/监控 | 性能监控、数据分析 |
133-
| 🍱 | assets | 资源文件 | 图片、字体、静态资源 |
134-
| 🚨 | lint | 代码检查 | 修复 linting 警告、代码质量 |
135-
| 💡 | comment | 注释 | 添加/更新注释、文档字符串 |
136-
| 🔊 | log | 日志 | 添加日志、调试信息 |
137-
| 🔇 | log | 移除日志 | 删除日志、静默输出 |
109+
| 表情符号 | 类型 | 描述 | 使用场景 |
110+
|------|-----------|----------|--------------------|
111+
| 🎉 | feat | 重大功能/初始化 | 新功能、重大更新、项目初始化 |
112+
| | feat | 新功能/增强 | 添加功能、增强、文档更新 |
113+
| 🐛 | fix | Bug 修复 | 修复错误、解决问题 |
114+
| 🔧 | config | 配置修改 | 配置文件、CI/CD、构建配置 |
115+
| 📝 | docs | 文档更新 | 更新文档、README、注释 |
116+
| 🎨 | style | 代码风格/格式化 | 代码格式化、样式、结构优化 |
117+
| ♻️ | refactor | 重构 | 代码重构、包结构调整 |
118+
| | perf | 性能优化 | 性能优化、算法改进 |
119+
| 🔥 | remove | 删除代码/文件 | 删除无用代码、移除功能 |
120+
| 🧪 | test | 测试相关 | 添加测试、修复测试、测试配置 |
121+
| 👷 | ci | CI/CD | 持续集成、构建脚本 |
122+
| 📦 | build | 构建系统 | 依赖管理、构建配置 |
123+
| ⬆️ | upgrade | 升级依赖 | 升级库版本 |
124+
| ⬇️ | downgrade | 降级依赖 | 降级库版本 |
125+
| 🚀 | release | 发布版本 | 版本发布、标签创建 |
126+
| 🔀 | merge | 合并分支 | 分支合并、冲突解决 |
127+
| 🤖 | ai | AI 工具配置 | AI 助手配置、自动化 |
128+
| 💄 | optimize | 优化 | 性能优化、代码改进 |
129+
| 🌐 | network | 网络相关 | 网络配置、API 调用、远程服务 |
130+
| 🔐 | security | 安全/验证 | 安全修复、权限控制、验证 |
131+
| 🚑 | hotfix | 紧急修复 | 紧急修复、临时解决方案 |
132+
| 📈 | analytics | 分析/监控 | 性能监控、数据分析 |
133+
| 🍱 | assets | 资源文件 | 图片、字体、静态资源 |
134+
| 🚨 | lint | 代码检查 | 修复 linting 警告、代码质量 |
135+
| 💡 | comment | 注释 | 添加/更新注释、文档字符串 |
136+
| 🔊 | log | 日志 | 添加日志、调试信息 |
137+
| 🔇 | log | 移除日志 | 删除日志、静默输出 |
138138

139139
## 提交示例
140140

141141
### 简单格式示例
142+
142143
```bash
143144
✨ [shared] 添加统一异常处理
144145

@@ -148,6 +149,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
148149
```
149150

150151
### 复杂格式示例
152+
151153
```bash
152154
✨ [ai] LangChain4j集成优化
153155

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ org-springframework-modulith = "2.0.0-M1"
5050
org-springframework-security = "6.5.1"
5151
org-testcontainers = "1.21.3"
5252
org-testng = "7.11.0"
53-
project = "0.0.16"
53+
project = "0.0.17"
5454

5555
[libraries]
5656
cn-dev33-sa-token-redis-jackson = { module = "cn.dev33:sa-token-redis-jackson", version.ref = "cn-dev33-sa-token" }

testtoolkit/src/main/kotlin/io/github/truenine/composeserver/testtoolkit/testcontainers/ICacheRedisContainer.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ interface ICacheRedisContainer {
4848
val container by lazy {
4949
val config = TestcontainersConfigurationHolder.getTestcontainersProperties()
5050
GenericContainer(DockerImageName.parse(config.redis.image)).apply {
51+
withReuse(true)
5152
withExposedPorts(6379)
5253
setWaitStrategy(Wait.forLogMessage(".*Ready to accept connections.*\\n", 1).withStartupTimeout(Duration.ofSeconds(10)))
5354
start()

testtoolkit/src/main/kotlin/io/github/truenine/composeserver/testtoolkit/testcontainers/IDatabaseMysqlContainer.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ interface IDatabaseMysqlContainer {
5151
withUsername(config.mysql.username)
5252
withPassword(config.mysql.password)
5353
withEnv("MYSQL_ROOT_PASSWORD", config.mysql.rootPassword)
54+
withReuse(true)
55+
withLabel("reuse.UUID", "mysql-testcontainer-compose-server")
5456
addExposedPorts(3306)
5557
start()
5658
}

testtoolkit/src/main/kotlin/io/github/truenine/composeserver/testtoolkit/testcontainers/IDatabasePostgresqlContainer.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ interface IDatabasePostgresqlContainer {
5050
withUsername(config.postgres.username)
5151
withPassword(config.postgres.password)
5252
addExposedPorts(5432)
53+
withReuse(true)
5354
start()
5455
}
5556
}

testtoolkit/src/main/kotlin/io/github/truenine/composeserver/testtoolkit/testcontainers/IOssMinioContainer.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ interface IOssMinioContainer {
5050
val container by lazy {
5151
val config = TestcontainersConfigurationHolder.getTestcontainersProperties()
5252
GenericContainer(DockerImageName.parse(config.minio.image)).apply {
53+
withReuse(true)
5354
withEnv("MINIO_ROOT_USER", config.minio.accessKey)
5455
withEnv("MINIO_ROOT_PASSWORD", config.minio.secretKey)
5556
withEnv("MINIO_CONSOLE_ADDRESS", ":9001")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
testcontainers.reuse.enable=true

0 commit comments

Comments
 (0)