Skip to content

Commit b0133c2

Browse files
authored
Merge pull request #210 from codingapi/17.3.x
17.3.x
2 parents c03491e + a383924 commit b0133c2

488 files changed

Lines changed: 20579 additions & 20969 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, dev, 2.x, 8.2.x, 17.3.x ]
6+
pull_request:
7+
branches: [ main, dev, 2.x, 8.2.x, 17.3.x ]
8+
9+
concurrency: ${{ github.workflow }}-${{ github.ref }}
10+
11+
jobs:
12+
build:
13+
name: Build & Test
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout Repo
17+
uses: actions/checkout@v5
18+
19+
- name: Set up JDK 17
20+
uses: actions/setup-java@v5
21+
with:
22+
distribution: temurin
23+
java-version: 17
24+
cache: maven
25+
26+
- name: Compile
27+
run: ./mvnw clean compile -P travis
28+
29+
- name: Test
30+
run: ./mvnw test -P travis
31+
32+
- name: Upload coverage to Codecov
33+
uses: codecov/codecov-action@v5
34+
with:
35+
token: ${{ secrets.CODECOV_TOKEN }}
36+
files: springboot-starter/target/site/jacoco/jacoco.xml,springboot-starter-script/target/site/jacoco/jacoco.xml,springboot-starter-security/target/site/jacoco/jacoco.xml,springboot-starter-data-fast/target/site/jacoco/jacoco.xml,springboot-starter-data-authorization/target/site/jacoco/jacoco.xml
37+
fail_ci_if_error: true
38+
verbose: true
39+
40+
- name: Install
41+
run: ./mvnw install -P travis -DskipTests

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,8 @@ build/
4848
.codegraph
4949

5050
### serena ###
51-
.serena
51+
.serena
52+
53+
### flatten-maven-plugin ###
54+
.flattened-pom.xml
55+
test.db*

.travis.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

CLAUDE.md

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
44

55
## 项目概述
66

7-
springboot-framework 是一个基于 Spring Boot 3.3.5(Java 17)的多模块企业级开发框架,由 CodingApi 团队维护。核心定位是为领域驱动设计(DDD)与事件风暴提供开箱即用的基础设施,当前版本为 `3.4.55`
7+
springboot-framework 是一个基于 Spring Boot 3.3.5(Java 17)的多模块企业级开发框架,由 CodingApi 团队维护。核心定位是为领域驱动设计(DDD)与事件风暴提供开箱即用的基础设施。当前开发版本为 `17.3.0-SNAPSHOT`,采用 Maven `${revision}` CI-Friendly 版本机制,正式发布时通过 `-Drevision=x.y.z` 指定正式版本号。版本号含义:17 = JDK 版本,3 = Spring Boot 大版本,第三位为补丁版本
88

99
**回复语言**:请使用中文进行回答。
1010

@@ -19,30 +19,36 @@ springboot-framework 是一个基于 Spring Boot 3.3.5(Java 17)的多模块
1919

2020
# 运行单个模块的测试
2121
./mvnw test -pl springboot-starter
22-
./mvnw test -pl springboot-starter-flow
2322
./mvnw test -pl springboot-starter-security
2423

2524
# 运行单个测试类
2625
./mvnw test -pl springboot-starter -Dtest=SomeTestClass
2726

2827
# 运行 example 示例应用(端口 8090,H2 文件数据库)
2928
./mvnw spring-boot:run -pl example/example-server
29+
30+
# 正式发布(通过 -Drevision 指定正式版本号,无需修改 pom)
31+
./mvnw clean deploy -P ossrh -Drevision=17.3.0
3032
```
3133

32-
### 前端(admin-ui / mobile-ui
34+
### 前端(frontend monorepo
3335

3436
```bash
35-
cd admin-ui # 或 mobile-ui
36-
npm install
37-
npm run dev # 开发模式(代理后端)
38-
npm run mock # Mock 模式(前端 mock 数据)
39-
npm run build # 生产构建
40-
npm test # Jest 测试
37+
cd frontend
38+
pnpm install
39+
pnpm dev:pc # PC 端开发模式(代理后端)
40+
pnpm dev:mobile # 移动端开发模式(代理后端)
41+
pnpm mock:pc # PC 端 Mock 模式(前端 mock 数据)
42+
pnpm mock:mobile # 移动端 Mock 模式(前端 mock 数据)
43+
pnpm build:pc # PC 端生产构建
44+
pnpm build:mobile # 移动端生产构建
45+
pnpm test:pc # PC 端 Jest 测试
46+
pnpm test:mobile # 移动端 Jest 测试
4147
```
4248

43-
- admin-ui 基于 React 18 + Ant Design 5 + Ant Design Pro Components + Rsbuild
44-
- mobile-ui 基于 React 18 + Ant Design Mobile 5 + Rsbuild
45-
- 两者都使用 Module Federation 做微前端集成
49+
- apps/pc(原 admin-ui基于 React 18 + Ant Design 5 + Ant Design Pro Components + Rsbuild
50+
- apps/mobile(原 mobile-ui基于 React 18 + Ant Design Mobile 5 + Rsbuild
51+
- 两者由 pnpm workspace 统一管理,公共代码位于 packages/shared(@springboot-framework/shared);均使用 Module Federation 做微前端集成
4652

4753
## 模块架构
4854

@@ -54,7 +60,6 @@ npm test # Jest 测试
5460
| `springboot-starter-security` | Spring Security + JWT 无状态认证 / Redis 有状态认证,加解密支持 |
5561
| `springboot-starter-data-fast` | JPA 增强:FastRepository 支持动态过滤查询、HQL 构建、SearchRequest |
5662
| `springboot-starter-data-authorization` | 数据权限:通过 JDBC Connection/Statement 代理拦截 SQL,透明注入权限条件 |
57-
| `springboot-starter-flow` | 工作流引擎:流程定义、节点流转、审批、委托、会签、数据快照、事件通知 |
5863
| `springboot-starter-script` | Groovy 脚本引擎:运行时编译、LRU 缓存、热更新,提供 REST API |
5964

6065
### 自动配置注册
@@ -68,7 +73,6 @@ springboot-starter (核心,无外部依赖)
6873
├── springboot-starter-security (依赖 starter)
6974
├── springboot-starter-data-fast (依赖 starter)
7075
├── springboot-starter-data-authorization (依赖 starter + JSqlParser)
71-
├── springboot-starter-flow (依赖 starter)
7276
└── springboot-starter-script (依赖 starter + Groovy)
7377
```
7478

@@ -102,7 +106,7 @@ MapResponse // Map 响应
102106
```java
103107
PageRequest request = PageRequest.of(0, 20);
104108
request.addFilter("name", "张三");
105-
request.addFilter("age", Relation.GT, 18);
109+
request.addFilter("age", Relation.GREATER_THAN, 18);
106110
Page<User> page = userRepository.findAll(request);
107111
```
108112

@@ -112,10 +116,6 @@ Page<User> page = userRepository.findAll(request);
112116

113117
`ConnectionProxy``PreparedStatementProxy` / `StatementProxy` 代理链,在 SQL 执行前通过 `SQLRunningContext.intercept(sql)` 注入权限条件,实现透明的行级数据过滤。使用 JSqlParser 解析和改写 SQL。
114118

115-
### 工作流引擎
116-
117-
核心流程:`FlowWork`(流程定义)→ `FlowNode`(节点)→ `FlowRecord`(审批记录)→ `FlowBackup`(版本快照)。发起流程通过 `FlowStartService.startFlow()` 驱动,审批通过 `FlowNodeService` 逐节点流转,每个状态变更推送 `FlowApprovalEvent`
118-
119119
## DDD 示例项目结构(example 模块)
120120

121121
```
@@ -127,11 +127,9 @@ example/
127127
example-app-cmd-domain — 命令服务(CQRS Command 侧,领域编排)
128128
example-app-cmd-meta — 元数据命令服务
129129
example-domain — 领域层
130-
example-domain-leave — 请假领域(Entity、Repository、Service)
131130
example-domain-user — 用户领域(Entity、Repository、Service、Event、Gateway)
132131
example-infra — 基础设施层
133132
example-infra-jpa — JPA 持久化实现
134-
example-infra-flow — 工作流集成
135133
example-infra-security — 安全配置
136134
```
137135

@@ -153,7 +151,7 @@ codingapi.framework.handler-thread-pool-size=20 # 事件异步线程池大小
153151

154152
## 关键依赖版本
155153

156-
见根 `pom.xml``<properties>` 区块。主要版本:Groovy 4.0.24、JSqlParser 5.0、Fastjson 2.0.53、JJWT 0.12.6、H2 2.3.232、Kryo 5.6.2
154+
见根 `pom.xml``<properties>` 区块。主要版本:Groovy 4.0.24、JSqlParser 5.0、Fastjson 2.0.53、JJWT 0.12.6、H2 2.3.232。
157155

158156

159157
<!-- PKR-START -->

CONTRIBUTING.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,17 @@ Please make sure to read and observe our [Code of Conduct](./CODE_OF_CONDUCT.md)
1111

1212
### Setting up your development environment
1313

14-
You should have JDK 1.8 or later installed in your system.
14+
You should have JDK 17 or later installed in your system.
15+
16+
The project ships with the Maven Wrapper, so there is no need to install Maven separately.
17+
18+
```bash
19+
# Full build
20+
./mvnw clean install
21+
22+
# Run the tests only (the same command CI uses)
23+
./mvnw clean test -P travis
24+
```
1525

1626
## Contributing
1727

@@ -23,7 +33,13 @@ We are very glad to accept improvements for these aspects.
2333

2434
### GitHub workflow
2535

26-
We use the `dev` branch as the development branch, which indicates that this is a unstable branch.
36+
Development mainly happens on version branches (e.g. `17.3.x`, `8.2.x`) and on the `dev` branch,
37+
which is an unstable branch. The `main` branch stays stable, and CI runs on pushes and pull requests
38+
targeting `main`, `dev`, `2.x`, `8.2.x` and `17.3.x`.
39+
40+
The project version (e.g. `17.3.0-SNAPSHOT`, where `17` is the JDK version, `3` is the Spring Boot
41+
major version and the last number is the patch version) is managed with the Maven `${revision}`
42+
CI-Friendly mechanism, so no `pom.xml` needs to be modified during development or for a release.
2743

2844
Here are the workflow for contributors:
2945

@@ -74,4 +90,4 @@ All code should be well reviewed by one or more committers. Some principles:
7490

7591
#### Mailing list
7692

77-
If you have any questions or advice, please contact 1991wangliang@gmail.com.
93+
If you have any questions or advice, please contact wangliang@codingapi.com.

0 commit comments

Comments
 (0)