Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
3b96006
🤖 [claude] add .claude/ to .gitignore
TrueNine Jul 12, 2025
4e257cf
🔧 [ci] 仅在 main 分支上触发 CI 流水线
TrueNine Jul 12, 2025
c6f0f0c
✨ [docs] 更新 GLOBAL_CLAUDE.md,添加核心工作原则、代码规范和安全编程指南
TrueNine Jul 12, 2025
beb4f3c
✨ [docs] 更新 GLOBAL_CLAUDE.md
TrueNine Jul 12, 2025
4e41c19
🤖 [lingma] 添加通义灵码ai规则支持
TrueNine Jul 12, 2025
9c34267
🔥 [EmptyDefault] 相关定义
TrueNine Jul 12, 2025
a9778dc
🔥 [EmptyDefault] 相关定义
TrueNine Jul 12, 2025
39b9a64
📖 [gradle] 关闭缓存配置
TrueNine Jul 12, 2025
1844080
♻️ [refactor] 重构日志工具类,Slf4jFns 重命名为 LoggerFns 并添加测试
TrueNine Jul 12, 2025
8b504c5
♻️ [testtoolkit] rename extension files for better naming convention
TrueNine Jul 12, 2025
bfd2e9a
📦 [jacoco] update JaCoCo conventions configuration
TrueNine Jul 12, 2025
b07cdc3
📦 [deps] update dependency versions in libs.versions.toml
TrueNine Jul 12, 2025
434fe62
📦 [testtoolkit] update build configuration
TrueNine Jul 12, 2025
799f328
✨ [testtoolkit] update type aliases
TrueNine Jul 12, 2025
68503de
✨ [testtoolkit] enhance logger extensions
TrueNine Jul 12, 2025
bac4c78
✨ [testtoolkit] update test configuration bean
TrueNine Jul 12, 2025
52a9628
✨ [testtoolkit] enhance test environment listener
TrueNine Jul 12, 2025
a7f728f
🧪 [shared] update IString test cases
TrueNine Jul 12, 2025
a9615f5
🧪 [shared] update Java NIO Path functions test
TrueNine Jul 12, 2025
0dac136
🧪 [shared] update regex constants test
TrueNine Jul 12, 2025
d4ed51d
🧪 [shared] update typing test cases
TrueNine Jul 12, 2025
99cdd54
🧪 [testtoolkit] update testcontainers verification
TrueNine Jul 12, 2025
41a4886
🧪 [testtoolkit] update test configuration bean test
TrueNine Jul 12, 2025
b800a8a
🧪 [shared] add ByteArray functions test
TrueNine Jul 12, 2025
b1e8a9c
🧪 [shared] add Collection functions test
TrueNine Jul 12, 2025
dc88029
🧪 [shared] add Java DateTime functions test
TrueNine Jul 12, 2025
3253005
🧪 [shared] add Java Reflection functions test
TrueNine Jul 12, 2025
5bf9af3
🧪 [shared] add annotations test suite
TrueNine Jul 12, 2025
0525afe
🧪 [shared] add cache names constants test
TrueNine Jul 12, 2025
fa53cfc
🧪 [shared] add database names constants test
TrueNine Jul 12, 2025
389d98c
🧪 [shared] add HTTP headers constants test
TrueNine Jul 12, 2025
39619f7
🧪 [shared] add internet address constants test
TrueNine Jul 12, 2025
b086936
🧪 [shared] add HTTP methods constants test
TrueNine Jul 12, 2025
553f9cf
♻️ [testtoolkit] rename extension files for better naming convention
TrueNine Jul 13, 2025
cfbc0c1
🤖 [claude] 提交规范
TrueNine Jul 13, 2025
fdae1e0
🧪 [shared] 加密算法测试
TrueNine Jul 13, 2025
39b3467
🧪 [shared] 异常处理测试
TrueNine Jul 13, 2025
80fd2e5
✨ [testtoolkit] 测试工具类
TrueNine Jul 13, 2025
3bbef79
🧪 [testtoolkit] 测试套件
TrueNine Jul 13, 2025
d3f4983
🐛 [testtoolkit] 修复 LoggerExtensionsTest 语法错误
TrueNine Jul 13, 2025
3aec203
🎨 [testtoolkit] 优化主要源码格式
TrueNine Jul 13, 2025
2e8988c
🎨 [testtoolkit] 优化测试代码格式
TrueNine Jul 13, 2025
abaf42f
♻️ [depend/springdoc-openapi] 重构 BeanSetupTest 测试配置
TrueNine Jul 13, 2025
788e78a
✨ [depend/springdoc-openapi] 添加测试应用程序
TrueNine Jul 13, 2025
38b226d
🧪 [depend/springdoc-openapi] 添加自动配置测试
TrueNine Jul 13, 2025
d9dab6b
🧪 [depend/springdoc-openapi] 添加 OpenAPI 配置测试
TrueNine Jul 13, 2025
65043a6
🧪 [depend/springdoc-openapi] 添加配置属性测试
TrueNine Jul 13, 2025
4d475bf
🧪 [depend/springdoc-openapi] 添加 API 端点集成测试
TrueNine Jul 13, 2025
a045661
🧪 [depend-jackson] Jackson 序列化测试增强
TrueNine Jul 13, 2025
83aa6ac
🐛 [security] fix method name typo
TrueNine Jul 13, 2025
0b021cd
✨ [servlet] enhance filename handling
TrueNine Jul 13, 2025
71ebdcd
🧪 [servlet] enhance existing test coverage
TrueNine Jul 13, 2025
4338ed4
🧪 [security] enhance sensitive data test coverage
TrueNine Jul 13, 2025
f313002
🧪 [shared] enhance page parameter test coverage
TrueNine Jul 13, 2025
a1c2a25
🧪 [servlet] add comprehensive test suite
TrueNine Jul 13, 2025
97b3d32
🧪 [crypto] add string functions test
TrueNine Jul 13, 2025
b69ded0
🧪 [security] add comprehensive security test suite
TrueNine Jul 13, 2025
fe2468b
🎨 [security] 代码格式化调整
TrueNine Jul 13, 2025
736d164
🧪 [servlet] 测试配置优化
TrueNine Jul 13, 2025
078cb79
🔥 [springdoc-openapi] 清理测试代码
TrueNine Jul 13, 2025
cd615ad
🔥 [testtoolkit] 清理 MinIO 容器测试代码
TrueNine Jul 13, 2025
096a908
📚 [readme] 更新 对齐 jimmer 版本
TrueNine Jul 13, 2025
dc5d05b
🎨 [catalog] 调整catalog顺序
TrueNine Jul 13, 2025
634d2af
🚀 [release] 0.0.6
TrueNine Jul 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [ main, dev ]
branches: [ main ]
pull_request:
branches: [ main, dev ]
branches: [ main ]

jobs:
test:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,6 @@ logs

### Customs ###
TODO.*

### AI Coder ###
/.claude/
111 changes: 111 additions & 0 deletions .lingma/rules/project_rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# CLAUDE.md

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

## 框架定位

Compose Server 是一个现代化、模块化的 Kotlin 企业级服务端开发**框架**,而非脚手架。它通过 Gradle 多模块方式,提供安全、数据库、缓存、对象存储、支付、AI 等企业级能力,支持按需集成到任意 Spring Boot 项目中。

## 构建和测试命令

这是一个基于 Gradle 的 Kotlin 多模块项目。

- `./gradlew build` - 构建整个项目
- `./gradlew clean` - 清理构建输出
- `./gradlew publishToMavenLocal` - 发布到本地 Maven 仓库
- `./gradlew versionCatalogUpdate` - 更新版本目录中的依赖版本
- `./gradlew test` - 运行所有测试
- `./gradlew :模块名:test` - 运行特定模块的测试
- `./gradlew spotlessCheck` - 检查代码格式
- `./gradlew spotlessApply` - 自动修复代码格式

## 项目架构

### 模块化结构

本框架采用多模块设计,主要模块包括:

- **shared** - 核心基础组件,包含通用工具类、异常处理、类型定义、统一响应、分页等
- **meta** - 元数据和注解处理器
- **rds** - 数据库相关(Jimmer ORM、CRUD、PostgreSQL 扩展、Flyway 迁移)
- **surveillance** - 监控组件
- **security** - 安全相关(Spring Security、OAuth2、加密解密)
- **oss** - 对象存储(MinIO、阿里云 OSS、华为云 OBS)
- **pay** - 支付模块(微信支付 V3)
- **cacheable** - 多级缓存(Redis、Caffeine)
- **data** - 数据处理(EasyExcel、爬虫、行政区划等)
- **depend** - 特定依赖处理
- **testtoolkit** - 测试工具包
- **gradle-plugin** - Gradle 插件
- **ksp** - Kotlin Symbol Processing
- **sms** - 短信服务(腾讯云短信,短信抽象层)
- **mcp** - AI 能力(LangChain4j、Ollama、智谱 AI)

> 所有模块均可独立集成,推荐组合见下表。

### 推荐模块组合

| 使用场景 | 推荐模块组合 |
|----------------|----------------------------------------|
| 基础 Web API | shared + security-spring |
| 数据库操作 | shared + rds-shared + rds-crud |
| 文件存储 | shared + oss-shared + oss-minio |
| 微信支付 | shared + pay |
| 数据导入导出 | shared + data-extract |
| AI 能力 | shared + mcp |

## 技术栈

- **Kotlin** 2.2.x
- **Spring Boot** 3.5.x
- **Jimmer** 0.9.x
- **Gradle** 9.x
- **PostgreSQL**、**Redis**、**Caffeine**、**MinIO**、**阿里云 OSS**、**华为云 OBS** 等

## 依赖管理

- 统一使用 Gradle Version Catalog(`gradle/libs.versions.toml`)管理依赖版本
- 所有模块版本、groupId 通过根项目统一管理
- 推荐通过 `publishToMavenLocal` 集成本地开发版本


## 代码约定

- 所有模块使用 `kotlinspring-convention` 插件,集成 Spring Boot 与 Kotlin 规范
- 包名格式:`io.github.truenine.composeserver.模块名`

- 代码格式化:使用 Spotless,提交前请运行 `./gradlew spotlessApply`
- 数据库迁移:使用 Flyway,脚本位于 `rds/flyway-migration-数据库类型/src/main/resources/db/migration/`,命名规则 `V版本号__描述.sql`

## 集成与最佳实践

1. **依赖引入**
在业务项目的 `build.gradle.kts` 中按需添加依赖,例如:
```kotlin
implementation("io.github.truenine:composeserver-shared:latest")
implementation("io.github.truenine:composeserver-rds-shared:latest")
implementation("io.github.truenine:composeserver-security-spring:latest")
```
2. **自动配置**
启用自动配置注解(如有):
```kotlin
@SpringBootApplication
@EnableComposeServer
class YourApplication
```
3. **统一响应、异常、分页等**
推荐使用框架内置的统一响应、异常处理、分页等能力,详见 `shared` 模块。

4. **测试与发布**
- 修改代码后先格式化,再运行测试,最后构建或发布到本地 Maven 仓库
- 推荐使用 `./gradlew test`、`./gradlew build`、`./gradlew publishToMavenLocal`

## 其他说明

- 本项目为**框架库**,不包含脚手架或项目初始化功能
- 所有模块均已发布至 Maven Central,详见 [README.md] 或 [Maven Central](https://central.sonatype.com/search?q=g:io.github.truenine)
- 详细 API、集成示例、变更日志等请参考 [README.md] 和官方文档

---

如需为本项目贡献代码或扩展模块,请遵循上述规范和最佳实践。
Loading