Skip to content

Commit 4de1bf4

Browse files
xlorneclaude
andcommitted
refactor: 移除流程引擎模块、前端合并为 pnpm workspace、版本机制改为 CI-Friendly
1. 移除流程引擎:删除 springboot-starter-flow 模块及全部关联内容 (example-infra-flow、Flow/请假示例、entrust 委托链路、文档、前端页面), 流程引擎已重构为独立仓库:https://github.com/codingapi/flow-engine, README 增加迁移说明 2. 前端 monorepo:admin-ui/mobile-ui 合并至 frontend/(pnpm workspace), apps/pc、apps/mobile 仅保留 pc/mobile 两组指令,公共代码抽至 packages/shared(@springboot-framework/shared),结构参考 flow-frontend 3. 版本管理:采用 ${revision} + flatten-maven-plugin(resolveCiFriendliesOnly), 开发版本锁定 17.3.0-SNAPSHOT(17=JDK 版本,3=Spring Boot 大版本), 发版通过 -Drevision=x.y.z 指定正式版本 Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 1d97442 commit 4de1bf4

404 files changed

Lines changed: 11388 additions & 20692 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.

.gitignore

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

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

CLAUDE.md

Lines changed: 19 additions & 21 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

@@ -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 -->

README.md

Lines changed: 45 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,17 @@
1111

1212
## Project Version | 项目版本说明
1313

14-
v.2.x 为springboot 2.x版本,使用jdk8版本
15-
v.3.x 为springboot 3.x版本,使用jdk17版本
14+
`17.3.0` 起,项目采用 CI-Friendly 版本管理方式(与 [flow-engine](https://github.com/codingapi/flow-engine) 相同):pom 中的版本声明为 `${revision}`,开发期锁定为 SNAPSHOT 版本(当前为 `17.3.0-SNAPSHOT`),正式发布时通过 `-Drevision=x.y.z` 指定正式版本号,无需修改 pom。
15+
16+
版本号含义:第一位为 JDK 版本,第二位为 Spring Boot 大版本,第三位为补丁版本。例如 `17.3.0` 表示基于 JDK 17、Spring Boot 3.x 的第 0 个补丁版本。
17+
18+
(历史版本线:v.2.x 对应 Spring Boot 2.x / JDK 8;v.3.x 对应 Spring Boot 3.x / JDK 17。)
19+
20+
Since `17.3.0`, the project uses a CI-Friendly versioning scheme (same approach as [flow-engine](https://github.com/codingapi/flow-engine)): the pom declares its version as `${revision}`, which is pinned to a SNAPSHOT during development (currently `17.3.0-SNAPSHOT`); the release version is supplied via `-Drevision=x.y.z` at release time, with no pom changes needed.
21+
22+
Version number convention: first segment = JDK version, second segment = Spring Boot major version, third segment = patch version. For example, `17.3.0` targets JDK 17 and Spring Boot 3.x, patch 0.
23+
24+
(Legacy lines: v.2.x for Spring Boot 2.x on JDK 8; v.3.x for Spring Boot 3.x on JDK 17.)
1625

1726
## Frontend Framework Version | 前端框架版本说明
1827

@@ -21,8 +30,23 @@ v.3.x 为springboot 3.x版本,使用jdk17版本
2130
| [@codingapi/ui-framework](https://github.com/codingapi/ui-compoments) | UI-Framework | [![npm](https://img.shields.io/npm/v/@codingapi/ui-framework.svg)](https://www.npmjs.com/package/@codingapi/ui-framework) |
2231
| [@codingapi/form-pc](https://github.com/codingapi/ui-compoments) | Form-PC | [![npm](https://img.shields.io/npm/v/@codingapi/form-pc.svg)](https://www.npmjs.com/package/@codingapi/form-pc) |
2332
| [@codingapi/form-mobile](https://github.com/codingapi/ui-compoments) | Form-Mobile | [![npm](https://img.shields.io/npm/v/@codingapi/form-mobile.svg)](https://www.npmjs.com/package/@codingapi/form-mobile) |
24-
| [@codingapi/flow-pc](https://github.com/codingapi/ui-compoments) | Flow-PC | [![npm](https://img.shields.io/npm/v/@codingapi/flow-pc.svg)](https://www.npmjs.com/package/@codingapi/flow-pc) |
25-
| [@codingapi/flow-mobile](https://github.com/codingapi/ui-compoments) | Flow-Mobile | [![npm](https://img.shields.io/npm/v/@codingapi/flow-mobile.svg)](https://www.npmjs.com/package/@codingapi/flow-mobile) |
33+
34+
前端代码位于 [frontend](./frontend) 目录,采用 pnpm workspace 管理:包含 `apps/pc`(原 admin-ui)与 `apps/mobile`(原 mobile-ui)两个应用,公共代码抽取在 `packages/shared`@springboot-framework/shared)。
35+
36+
The frontend code lives in the [frontend](./frontend) directory, managed as a pnpm workspace: it contains two apps `apps/pc` (formerly admin-ui) and `apps/mobile` (formerly mobile-ui), with shared code extracted into `packages/shared` (@springboot-framework/shared).
37+
38+
```bash
39+
cd frontend
40+
pnpm install
41+
pnpm dev:pc # PC 端开发模式(代理后端) / PC dev mode (proxies backend)
42+
pnpm dev:mobile # 移动端开发模式(代理后端) / Mobile dev mode (proxies backend)
43+
pnpm build:pc # PC 端生产构建 / PC production build
44+
pnpm build:mobile # 移动端生产构建 / Mobile production build
45+
```
46+
47+
更多指令见 [frontend/README.md](./frontend/README.md)
48+
49+
See [frontend/README.md](./frontend/README.md) for more scripts.
2650

2751

2852
## Project Modules Description | 项目模块介绍
@@ -31,59 +55,60 @@ v.3.x 为springboot 3.x版本,使用jdk17版本
3155
* springboot-starter-script | 脚本引擎框架
3256
* springboot-starter-data-fast | 快速数据呈现框架
3357
* springboot-starter-data-authorization | 数据权限框架
34-
* springboot-starter-flow | 流程引擎框架
3558
* springboot-starter-security | security权限框架支持基于JWT的无状态权限认证与Redis的有状态权限认证
3659
* example | 示例DDD项目
37-
* admin-ui | 管理后台UI脚手架
38-
* mobile-ui | 移动端UI脚手架
60+
* frontend | 前端 monorepo(pnpm workspace),包含 apps/pc(原 admin-ui)管理后台UI脚手架、apps/mobile(原 mobile-ui)移动端UI脚手架与 packages/shared 公共代码
61+
62+
## Flow Engine Migration | 流程引擎迁移说明
63+
64+
工作流引擎(springboot-starter-flow)已从本框架移除,重构为独立仓库维护,新地址:[https://github.com/codingapi/flow-engine](https://github.com/codingapi/flow-engine)。需要使用流程引擎的项目请改用独立仓库。
65+
66+
The workflow engine (springboot-starter-flow) has been removed from this framework and refactored into an independently maintained repository: [https://github.com/codingapi/flow-engine](https://github.com/codingapi/flow-engine). Projects that need the workflow engine should migrate to the standalone repository.
3967

4068
## SpringBoot DDD Architecture | SpringBoot DDD 框架图
4169

4270
![](./docs/img/ddd_architecture.png)
4371

4472
## maven install
4573

74+
以下示例使用正式发布版本(如 `17.3.0`,最新发布版见上方 Maven Central 徽章);如需体验开发快照版本,请使用 `17.3.0-SNAPSHOT`
75+
76+
The examples below use an official release version (e.g. `17.3.0`; see the Maven Central badge above for the latest release). Use `17.3.0-SNAPSHOT` for the development snapshot.
77+
4678
```
4779
<!-- Springboot领域驱动框架 -->
4880
<dependency>
4981
<groupId>com.codingapi.springboot</groupId>
5082
<artifactId>springboot-starter</artifactId>
51-
<version>${last.version}</version>
83+
<version>17.3.0</version>
5284
</dependency>
5385
5486
<!-- 脚本引擎框架 -->
5587
<dependency>
5688
<groupId>com.codingapi.springboot</groupId>
5789
<artifactId>springboot-starter-script</artifactId>
58-
<version>${last.version}</version>
90+
<version>17.3.0</version>
5991
</dependency>
6092
6193
<!-- 快速数据呈现框架 -->
6294
<dependency>
6395
<groupId>com.codingapi.springboot</groupId>
6496
<artifactId>springboot-starter-data-fast</artifactId>
65-
<version>${last.version}</version>
97+
<version>17.3.0</version>
6698
</dependency>
6799
68100
<!-- 数据权限框架 -->
69101
<dependency>
70102
<groupId>com.codingapi.springboot</groupId>
71103
<artifactId>springboot-starter-data-authorization</artifactId>
72-
<version>${last.version}</version>
104+
<version>17.3.0</version>
73105
</dependency>
74-
75-
<!-- 流程引擎框架 -->
76-
<dependency>
77-
<groupId>com.codingapi.springboot</groupId>
78-
<artifactId>springboot-starter-flow</artifactId>
79-
<version>${last.version}</version>
80-
</dependency>
81-
106+
82107
<!-- security&jwt权限框架 -->
83108
<dependency>
84109
<groupId>com.codingapi.springboot</groupId>
85110
<artifactId>springboot-starter-security</artifactId>
86-
<version>${last.version}</version>
111+
<version>17.3.0</version>
87112
</dependency>
88113
89114
```

admin-ui/mocks/index.ts

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

admin-ui/mocks/product.ts

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

admin-ui/mocks/user.ts

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

admin-ui/scripts/package.sh

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

admin-ui/src/api/account.ts

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

0 commit comments

Comments
 (0)