c52b3986e586947c3a2a4684480fc87d4c0dad29
chore: 更新 .gitignore并删除无用的日志文件- 在 .gitignore 中添加 Claude Code 相关的忽略项- 删除项目根目录下的 hs_err_pid8960.log 文件
Central Platform - 企业级微服务脚手架
项目简介
Central Platform 是一个基于 Spring Cloud 的企业级微服务脚手架,提供完整的微服务基础设施和通用业务模块,帮助快速构建企业级应用。
核心特性
- ✅ 微服务架构 - 基于 Spring Cloud 2022.0.4
- ✅ 服务治理 - Nacos 服务注册发现与配置中心
- ✅ API 网关 - Spring Cloud Gateway + Sentinel 限流熔断
- ✅ 认证授权 - OAuth2 + JWT + Spring Security
- ✅ 多租户支持 - 完整的多租户数据隔离方案
- ✅ 分布式缓存 - Redis + Redisson 分布式锁
- ✅ 数据库 - MyBatis Plus + 多数据源
- ✅ 全文搜索 - Elasticsearch 集成
- ✅ 文件存储 - 多云存储支持(阿里云OSS、七牛云、MinIO)
- ✅ 监控中心 - Spring Boot Admin 应用监控
- ✅ 代码生成 - 基于数据库表的代码生成器
技术栈
| 技术 | 版本 | 说明 |
|---|---|---|
| Java | 17 | 编程语言 |
| Spring Boot | 3.1.6 | 应用框架 |
| Spring Cloud | 2022.0.4 | 微服务框架 |
| Spring Cloud Alibaba | 2022.0.0.0 | 阿里云组件 |
| MyBatis Plus | 3.5.4.1 | ORM 框架 |
| MySQL | 8.0+ | 关系数据库 |
| Redis | 7.0+ | 缓存数据库 |
| Elasticsearch | 7.13.4 | 搜索引擎 |
| Nacos | Latest | 注册中心/配置中心 |
| Sentinel | Latest | 限流熔断 |
模块说明
central-platform -- 父项目,公共依赖
│ ├─zlt-business -- 业务模块一级工程
│ │ ├─user-center -- 用户中心[7000]
│ │ ├─file-center -- 文件中心[5000]
│ │ ├─search-center -- 搜索中心
│ │ │ ├─search-client -- 搜索中心客户端
│ │ │ ├─search-server -- 搜索中心服务端[7100]
│ │ ├─code-generator -- 代码生成器[7300]
│ │ └─demo-center -- 示例模块[8100]
│ ├─zlt-commons -- 通用工具一级工程
│ │ ├─zlt-common-core -- 核心工具类
│ │ ├─zlt-common-spring-boot-starter -- 通用配置
│ │ ├─zlt-db-spring-boot-starter -- 数据库集成
│ │ ├─zlt-redis-spring-boot-starter -- Redis集成
│ │ ├─zlt-log-spring-boot-starter -- 日志集成
│ │ ├─zlt-auth-client-spring-boot-starter -- 认证客户端
│ │ ├─zlt-loadbalancer-spring-boot-starter -- 负载均衡
│ │ ├─zlt-sentinel-spring-boot-starter -- 限流熔断
│ │ ├─zlt-elasticsearch-spring-boot-starter -- 搜索引擎
│ │ ├─zlt-oss-spring-boot-starter -- 对象存储
│ │ ├─zlt-sms-spring-boot-starter -- 短信集成
│ │ ├─zlt-zookeeper-spring-boot-starter -- Zookeeper集成
│ │ ├─zlt-wechat-common-core -- 微信通用核心
│ │ └─zlt-wechat-spring-boot-starter -- 微信集成
│ ├─zlt-gateway -- API网关[9900]
│ ├─zlt-uaa -- 认证授权中心[8000]
│ ├─zlt-config -- 配置中心
│ ├─zlt-monitor -- 监控中心
│ │ ├─sc-admin -- 应用监控[6500]
│ │ └─log-center -- 日志中心[7200]
│ └─zlt-doc -- 项目文档
└─database -- 数据库脚本
快速开始
环境要求
- JDK 17+
- Maven 3.6+
- MySQL 8.0+
- Redis 7.0+
- Nacos 2.0+
数据库初始化
mysql -u root -p < zlt-doc/database/init.sql
启动 Nacos
# 单机模式启动
sh nacos/bin/startup.sh -m standalone
访问: http://localhost:8848/nacos (账号: nacos/nacos)
编译项目
mvn clean install -DskipTests
启动服务
- 启动网关 (9900)
- 启动认证中心 (8000)
- 启动用户中心 (7000)
- 启动文件中心 (5000)
默认账号
- 用户名:
admin - 密码:
admin123
许可证
Apache License 2.0
Languages
Java
61.8%
TypeScript
31.9%
Less
5.4%
HTML
0.7%