登录 注册
网络与基础设施安全与隐私工具 dockeroauth2openairbac-managementsa-tokenspring-ai
6,707
Stars
1,106
Forks
97
Watchers
280
Open Issues
Apache-2.0
许可证
Java
语言
2019-08-26
创建时间
2026-11-09
最近更新

项目能做什么

基于 Spring Cloud 2025、Spring Boot 4 和 OAuth2 的 RBAC 权限管理系统。
来源:基于仓库元数据 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
<p align="center">
 <img src="https://img.shields.io/badge/Pig-4.1.3-success.svg" alt="Pig">
 <img src="https://img.shields.io/badge/Spring%20Cloud-2025.1.4-blue.svg" alt="Spring Cloud">
 <img src="https://img.shields.io/badge/Spring%20Boot-4.1.2-blue.svg" alt="Spring Boot">
 <img src="https://img.shields.io/badge/Vue-3.5.44-blue.svg" alt="Vue">
 <img src="https://img.shields.io/github/license/pig-mesh/pig" alt="License">
 <img src="https://gitcode.com/pig-mesh/pig/star/badge.svg" alt="Stars">
</p>

## 系统说明

- Pig 是基于 Spring Cloud、Spring Boot、OAuth2 的 RBAC 企业级快速开发平台,同时支持微服务架构和单体架构。
- 认证中心基于 Spring Authorization Server 落地生产级 OAuth2 实践,支持授权码、密码、刷新令牌等常见登录与授权场景。
- 当前开源版本保留认证、网关、用户权限、监控、代码生成和定时任务等核心能力,移除了商业版中的多租户、数据权限、动态路由、流程、支付、公众号、报表和移动端服务等扩展模块。
- 提供 Docker Compose 本地编排,支持快速启动 MySQL、Redis、Nacos 和业务服务。

## 使用文档

PIG 提供了完整的部署与开发文档:[docs.pig4cloud.com/open](https://docs.pig4cloud.com/open),涵盖开发环境配置、服务端启动、前端运行、微服务部署和单体部署等关键步骤。

### 其他产品

- [PIGX 在线体验](http://home.pig4cloud.com:38081)
- [自研 BPMN 工作流引擎](http://home.pig4cloud.com:38082)
- [大模型 RAG 知识库](http://home.pig4cloud.com:38083)

## 快速开始

### 基础环境

- JDK 17+
- Maven 3.9+
- Docker 和 Docker Compose
- Node.js 20.19.0+(运行 `pig-ui` 前端时需要)

### 微服务模式

在项目根目录执行完整编译,再构建并启动本地服务栈:

```bash
mvn clean install -T 4 -Pcloud
docker compose build && docker compose up
```

服务启动后,默认通过网关端口 `9999` 访问后端接口,Nacos 控制台端口为 `8848`。

### 单体模式

单体模式通过 `boot` profile 启用 `pig-boot` 模块:

```bash
mvn clean install -T 4 -Pboot
docker compose -f docker-compose-boot.yml build && docker compose -f docker-compose-boot.yml up
```

单体服务默认监听 `9999` 端口。

## 核心依赖

| 依赖 | 版本 |
| --- | --- |
| Pig | 4.1.3 |
| JDK | 17+ |
| Spring Boot | 4.1.2 |
| Spring Cloud | 2025.1.4 |
| Spring Cloud Alibaba | 2025.1.0.0 |
| Spring Security OAuth2 Authorization Server | 7.1.2 |
| MyBatis Plus | 3.5.16 |
| Nacos Client | 3.2.4 |
| Druid | 1.2.28 |
| Vue | 3.5.44 |
| Element Plus | 2.13.7 |
| Vite | 8.1.6 |

## 模块说明

```lua
pig-ui -- https://github.com/pig-mesh/pig-ui

pig
├── pig-register -- Nacos Server [8848/9848/18080]
├── pig-gateway -- Spring Cloud Gateway 网关 [9999]
├── pig-auth -- 授权服务 [3000]
├── pig-upms -- 通用用户权限管理模块
│   ├── pig-upms-api -- 通用用户权限管理公共 API
│   └── pig-upms-biz -- 通用用户权限业务服务 [4000]
├── pig-common -- 系统公共模块
│   ├── pig-common-bom -- 全局依赖版本管理
│   ├── pig-common-core -- 公共工具类核心包
│   ├── pig-common-data -- MyBatis Plus 与缓存扩展
│   ├── pig-common-datasource -- 动态数据源封装
│   ├── pig-common-log -- 日志服务
│   ├── pig-common-oss -- 文件上传工具类
│   ├── pig-common-security -- 安全工具类
│   ├── pig-common-sentinel -- Sentinel 与异常处理封装
│   ├── pig-common-swagger -- 接口文档封装
│   ├── pig-common-feign -- OpenFeign 扩展封装
│   ├── pig-common-excel -- Excel 导入导出封装
│   └── pig-common-xss -- XSS 安全封装
├── pig-visual -- 可视化支撑服务
│   ├── pig-monitor -- 服务监控 [5001]
│   ├── pig-codegen -- 图形化代码生成 [5003]
│   └── pig-quartz -- 定时任务管理台 [5007]
└── pig-boot -- 单体模式启动器 [9999],通过 `-Pboot` 启用
```

## 配置说明

- 微服务模式使用 `cloud` profile,默认激活 `dev` 环境配置。
- 单体模式使用 `boot` profile,`pig-boot` 模块只在该 
阅读完整原文

项目深度分析 规则生成(AI 未配置)

综合评分 42.6 分。该项目在“个人可实施性”维度得 37 分,“付费可能性”维度得 20.0 分,差异化空间 70.0 分(评分依据见评分卡)。

面向细分需求的二次开发产品

产品构想基于 pig 的核心能力,聚焦一个更窄的场景(如某平台、某行业)做差异化。
目标用户该细分场景用户
难度/周期中 · 2~6 周
收费模式买断制 / 订阅制 / 广告
竞争风险细分需求规模需验证
依据 AI 推测:基于项目主题标签的判断
以上为规则引擎基于仓库公开数据生成的参考结论,包含推测成分,不构成投资或创业承诺;配置 AI 后可获得更深入的分析。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

相似项目数据正在完善中,暂不展示(避免误导)

项目优势与风险

技术成熟度创建于 2019-08-26,近 30 天仍在推送,发布过 25 个 Release
社区活跃Star 6,707 / Fork 1,106 / Issue 280(数据支持,可自行核实)
许可证Apache-2.0
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

此项目未提供 Docker 镜像,安装步骤以原仓库 README 为准(涉及依赖安装与环境配置,对新手门槛较高)。