2019-10-26 16:29:56 +08:00
|
|
|
|
<p align="center">
|
2021-01-06 15:48:01 +08:00
|
|
|
|
<img src="https://img.shields.io/badge/Pig-3.0-success.svg" alt="Build Status">
|
2020-12-19 17:17:14 +08:00
|
|
|
|
<img src="https://img.shields.io/badge/Spring%20Cloud-2020-blue.svg" alt="Coverage Status">
|
|
|
|
|
<img src="https://img.shields.io/badge/Spring%20Boot-2.4-blue.svg" alt="Downloads">
|
2020-10-09 15:59:34 +08:00
|
|
|
|
<img src="https://img.shields.io/github/license/pig-mesh/pig"/>
|
2019-09-17 11:08:52 +08:00
|
|
|
|
</p>
|
2019-02-01 21:06:59 +08:00
|
|
|
|
|
2020-10-09 15:59:34 +08:00
|
|
|
|
|
|
|
|
|
## 系统说明
|
2019-02-01 21:06:59 +08:00
|
|
|
|
|
2020-12-19 17:17:14 +08:00
|
|
|
|
- 基于 Spring Cloud Hoxton 、Spring Boot 2.4、 OAuth2 的 RBAC **权限管理系统**
|
2020-10-09 15:59:34 +08:00
|
|
|
|
- 基于数据驱动视图的理念封装 element-ui,即使没有 vue 的使用经验也能快速上手
|
|
|
|
|
- 提供对常见容器化支持 Docker、Kubernetes、Rancher2 支持
|
|
|
|
|
- 提供 lambda 、stream api 、webflux 的生产实践
|
2019-02-01 21:06:59 +08:00
|
|
|
|
|
2020-10-09 15:59:34 +08:00
|
|
|
|
### 核心依赖
|
2019-10-26 16:23:16 +08:00
|
|
|
|
|
2020-10-09 15:59:34 +08:00
|
|
|
|
| 依赖 | 版本 |
|
|
|
|
|
| ---------------------- | ------------- |
|
2021-03-21 15:28:15 +08:00
|
|
|
|
| Spring Boot | 2.4.4 |
|
|
|
|
|
| Spring Cloud | 2020.0.2 |
|
2021-03-22 15:45:56 +08:00
|
|
|
|
| Spring Cloud Alibaba | 2020.0.RC |
|
2020-10-09 15:59:34 +08:00
|
|
|
|
| Spring Security OAuth2 | 2.3.6 |
|
2021-01-16 12:08:40 +08:00
|
|
|
|
| Mybatis Plus | 3.4.2 |
|
2021-03-21 15:28:15 +08:00
|
|
|
|
| hutool | 5.6.1 |
|
2020-10-09 15:59:34 +08:00
|
|
|
|
| Avue | 2.6.16 |
|
2019-02-01 21:06:59 +08:00
|
|
|
|
|
2020-10-09 15:59:34 +08:00
|
|
|
|
### 模块说明
|
|
|
|
|
|
|
|
|
|
```lua
|
|
|
|
|
pig-ui -- https://gitee.com/log4j/pig-ui
|
|
|
|
|
|
|
|
|
|
pig
|
|
|
|
|
├── pig-auth -- 授权服务提供[3000]
|
|
|
|
|
└── pig-common -- 系统公共模块
|
|
|
|
|
├── pig-common-core -- 公共工具类核心包
|
|
|
|
|
├── pig-common-datasource -- 动态数据源包
|
|
|
|
|
├── pig-common-job -- xxl-job 封装
|
|
|
|
|
├── pig-common-log -- 日志服务
|
|
|
|
|
├── pig-common-mybatis -- mybatis 扩展封装
|
|
|
|
|
├── pig-common-security -- 安全工具类
|
|
|
|
|
├── pig-common-swagger -- 接口文档
|
2020-12-23 12:22:02 +08:00
|
|
|
|
├── pig-common-feign -- feign 扩展封装
|
2020-10-09 15:59:34 +08:00
|
|
|
|
└── pig-common-test -- oauth2.0 单元测试扩展封装
|
|
|
|
|
├── pig-register -- Nacos Server[8848]
|
|
|
|
|
├── pig-gateway -- Spring Cloud Gateway网关[9999]
|
|
|
|
|
└── pig-upms -- 通用用户权限管理模块
|
|
|
|
|
└── pig-upms-api -- 通用用户权限管理系统公共api模块
|
|
|
|
|
└── pig-upms-biz -- 通用用户权限管理系统业务处理模块[4000]
|
|
|
|
|
└── pig-visual
|
|
|
|
|
└── pig-monitor -- 服务监控 [5001]
|
|
|
|
|
├── pig-codegen -- 图形化代码生成 [5002]
|
|
|
|
|
├── pig-sentinel-dashboard -- 流量高可用 [5003]
|
|
|
|
|
└── pig-xxl-job-admin -- 分布式定时任务管理台 [5004]
|
2019-11-05 01:07:27 +08:00
|
|
|
|
```
|
|
|
|
|
|
2020-10-09 15:59:34 +08:00
|
|
|
|
## 文档视频
|
2019-02-01 21:06:59 +08:00
|
|
|
|
|
2020-10-09 15:59:34 +08:00
|
|
|
|
[文档视频 wiki.pig4cloud.com](https://wiki.pig4cloud.com)
|
2019-02-01 21:06:59 +08:00
|
|
|
|
|
2020-10-09 15:59:34 +08:00
|
|
|
|
[PIGX 在线体验 pigx.pig4cloud.com](http://pigx.pig4cloud.com)
|
2020-05-09 20:02:45 +08:00
|
|
|
|
|
2020-10-09 15:59:34 +08:00
|
|
|
|
[产品白皮书 paper.pig4cloud.com](https://paper.pig4cloud.com)
|
|
|
|
|
|
|
|
|
|
## 快速开始
|
|
|
|
|
|
2020-10-09 16:06:35 +08:00
|
|
|
|
### 本地开发 运行
|
|
|
|
|
|
|
|
|
|
pig 提供了详细的[部署文档 wiki.pig4cloud.com](https://www.yuque.com/pig4cloud/pig/vsdox9),包括开发环境安装、服务端代码运行、前端代码运行等。
|
|
|
|
|
|
|
|
|
|
请务必**完全按照**文档部署运行章节 进行操作,减少踩坑弯路!!
|
|
|
|
|
|
2020-10-09 15:59:34 +08:00
|
|
|
|
### Docker 运行
|
2019-08-23 19:45:25 +08:00
|
|
|
|
|
2019-02-01 21:06:59 +08:00
|
|
|
|
```
|
2020-10-09 15:59:34 +08:00
|
|
|
|
# 下载并运行服务端代码
|
|
|
|
|
git clone https://gitee.com/log4j/pig.git
|
2019-02-01 21:06:59 +08:00
|
|
|
|
|
2020-10-09 15:59:34 +08:00
|
|
|
|
cd pig && mvn clean install && docker-compose up -d
|
2019-02-01 21:06:59 +08:00
|
|
|
|
|
2020-10-09 15:59:34 +08:00
|
|
|
|
# 下载并运行前端UI
|
|
|
|
|
git clone https://gitee.com/log4j/pig-ui.git
|
2019-02-01 21:06:59 +08:00
|
|
|
|
|
2020-10-09 15:59:34 +08:00
|
|
|
|
cd pig-ui && npm install -g cnpm --registry=https://registry.npm.taobao.org
|
2020-03-14 14:27:18 +08:00
|
|
|
|
|
2020-10-09 15:59:34 +08:00
|
|
|
|
npm run build:docker && docker-compose up -d
|
|
|
|
|
```
|
2020-09-14 21:39:42 +08:00
|
|
|
|
|
2020-10-09 15:59:34 +08:00
|
|
|
|
### 快速构架微服务
|
2020-09-14 21:39:42 +08:00
|
|
|
|
|
2020-11-15 16:14:52 +08:00
|
|
|
|
```bash
|
2020-10-09 15:59:34 +08:00
|
|
|
|
<!-- pig-gen archetype -->
|
2020-10-09 22:42:25 +08:00
|
|
|
|
# 在空文件夹执行以下命令,注意 windows 下 \ 修改成 ^
|
|
|
|
|
mvn archetype:generate \
|
|
|
|
|
-DgroupId=com.pig4cloud \
|
|
|
|
|
-DartifactId=demo \
|
|
|
|
|
-Dversion=1.0.0-SNAPSHOT \
|
|
|
|
|
-Dpackage=com.pig4cloud.pig.demo \
|
|
|
|
|
-DarchetypeGroupId=com.pig4cloud.archetype \
|
|
|
|
|
-DarchetypeArtifactId=pig-gen \
|
2021-03-21 15:28:15 +08:00
|
|
|
|
-DarchetypeVersion=3.1.0 \
|
2020-10-09 22:42:25 +08:00
|
|
|
|
-DarchetypeCatalog=local
|
2020-10-09 15:59:34 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## 免费公开课
|
2019-02-01 21:06:59 +08:00
|
|
|
|
|
2019-12-08 20:11:37 +08:00
|
|
|
|
<table>
|
|
|
|
|
<tr>
|
2020-09-01 13:41:31 +08:00
|
|
|
|
<td><a href="https://www.bilibili.com/video/av45084065" target="_blank"><img src="https://gitee.com/pig4cloud/oss/raw/master/2020-9/20200901133006.png"></a></td>
|
|
|
|
|
<td><a href="https://www.bilibili.com/video/av77344954" target="_blank"><img src="https://gitee.com/pig4cloud/oss/raw/master/2020-9/20200901133059.png"></a></td>
|
2019-12-08 20:11:37 +08:00
|
|
|
|
</tr>
|
2020-05-04 21:04:02 +08:00
|
|
|
|
<tr>
|
2020-09-14 21:39:42 +08:00
|
|
|
|
<td><a href="https://www.bilibili.com/video/BV1J5411476V" target="_blank"><img src="https://gitee.com/pig4cloud/oss/raw/master/2020-9/20200901133114.png"></a></td>
|
2020-09-01 13:41:31 +08:00
|
|
|
|
<td><a href="https://www.bilibili.com/video/BV14p4y197K5" target="_blank"><img src="https://gitee.com/pig4cloud/oss/raw/master/2020-9/20200901133124.png"></a></td>
|
2020-05-04 21:04:02 +08:00
|
|
|
|
</tr>
|
2019-12-08 20:11:37 +08:00
|
|
|
|
</table>
|
2019-02-01 21:06:59 +08:00
|
|
|
|
|
2020-10-09 15:59:34 +08:00
|
|
|
|
## 微信群 [禁广告]
|
2020-05-09 20:02:45 +08:00
|
|
|
|
|
2020-09-01 13:41:31 +08:00
|
|
|
|
![](https://gitee.com/pig4cloud/oss/raw/master/2020-9/20200901133142.png)
|
2020-05-09 20:02:45 +08:00
|
|
|
|
|
2020-10-09 15:59:34 +08:00
|
|
|
|
## 开源共建
|
|
|
|
|
|
|
|
|
|
### 开源协议
|
|
|
|
|
|
|
|
|
|
pig 开源软件遵循 [Apache 2.0 协议](https://www.apache.org/licenses/LICENSE-2.0.html)。
|
|
|
|
|
允许商业使用,但务必保留类作者、Copyright 信息。
|
|
|
|
|
|
2020-10-09 16:06:35 +08:00
|
|
|
|
![](https://gitee.com/pig4cloud/oss/raw/master/2020-10-9/1602229452602-image.png)
|
|
|
|
|
|
2020-10-09 15:59:34 +08:00
|
|
|
|
### 其他说明
|
|
|
|
|
|
|
|
|
|
1. 欢迎提交 [PR](https://dwz.cn/2KURd5Vf),注意对应提交对应 `dev` 分支
|
|
|
|
|
|
|
|
|
|
2. 欢迎提交 [issue](https://gitee.com/log4j/pig/issues),请写清楚遇到问题的原因、开发环境、复显步骤。
|
2020-05-09 20:02:45 +08:00
|
|
|
|
|
2020-10-09 15:59:34 +08:00
|
|
|
|
3. 联系作者 <a href="mailto:pig4cloud@qq.com">pig4cloud@qq.com</a>
|
2021-02-03 17:43:57 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[![Stargazers over time](https://whnb.wang/img/log4j/pig?e=604800)](https://whnb.wang/log4j/pig?e=604800)
|
|
|
|
|
|