# scaffold-cloud **Repository Path**: zeyc/scaffold-cloud ## Basic Information - **Project Name**: scaffold-cloud - **Description**: 造岛框架的微服务版本 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-22 - **Last Updated**: 2026-07-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Scaffold Cloud 企业级微服务平台 - Scaffold v2 微服务化版本 ## 项目结构 ``` scaffold-cloud/ ├── scaffold-shared/ # 共享 SDK │ ├── scaffold-shared-core/ # BaseEntity, Result, PageQuery, BusinessException │ ├── scaffold-shared-api/ # SPI 接口 + Feign Client 契约 │ └── scaffold-auth-sdk/ # LoginUser, JwtUtils, SecurityContextHelper ├── scaffold-gateway/ # API 网关 (port 8000) ├── scaffold-auth/ # 认证服务 (port 8100) ├── scaffold-system/ # 系统管理 (port 8200) ├── scaffold-file/ # 文件服务 (port 8300) ├── scaffold-bpm/ # 流程引擎 (port 8400) ├── scaffold-trade/ # 交易服务 (port 8500) ├── scaffold-pay/ # 支付服务 (port 8600) ├── scaffold-finance/ # 财务服务 (port 8700) ├── scaffold-notification/ # 通知服务 (port 8800) ├── scaffold-cms/ # 内容管理 (port 8900) ├── scaffold-lowcode/ # 低代码 (port 9000) ├── scaffold-job/ # 定时任务 (port 9100) ├── scaffold-monitor/ # 监控 (port 9200) ├── deploy/ # 部署编排 │ ├── docker-compose.yml # 基础设施编排 │ ├── mysql/init-databases.sql # 12 个数据库初始化 │ └── seata/ # Seata 配置 └── pom.xml # parent pom ``` ## 技术栈 | 组件 | 版本 | |------|------| | Java | 17 | | Spring Boot | 3.3.6 | | Spring Cloud | 2023.0.3 | | Spring Cloud Alibaba | 2023.0.1.2 | | MyBatis-Plus | 3.5.16 | | MySQL | 8.0 | | Redis | 7 | | Nacos | 2.3.2 | | Sentinel | 1.8.8 | | Seata | 2.0.0 | | RocketMQ | 5.3.0 | | SkyWalking | 9.7.0 | ## 快速启动 ### 1. 启动基础设施 ```bash cd deploy docker compose up -d ``` 等待所有服务启动(约 1-2 分钟)。验证: - Nacos: http://localhost:8848/nacos (sentinel/sentinel) - Sentinel: http://localhost:8858 (sentinel/sentinel) - RocketMQ Dashboard: http://localhost:8180 - SkyWalking UI: http://localhost:12800 ### 2. 编译项目 ```bash mvn clean install -DskipTests ``` ### 3. 启动服务 启动顺序: 1. scaffold-gateway (8000) 2. scaffold-auth (8100) 3. scaffold-system (8200) 4. 其他业务服务按需启动 ## 架构约定 - 后端 4 层架构:Controller -> Service -> Repository -> Mapper - 写操作统一 POST,禁用 PUT/DELETE - 前端 ID 字段必须 string 类型(雪花 ID) - 软删除列名固定 `deleted` - 统一响应格式 `Result` - 跨服务调用走 Feign,异常通过 Result.code 传递 - 分布式事务优先用 RocketMQ 最终一致性,强一致用 Seata AT