大家好,欢迎来到IT知识分享网。
1、PigX简介
目录
文章目录
官方简介





- 基于
Spring Cloud Hoxton、Spring Boot 2.3、OAuth2的RBAC权限管理系统 - 基于数据驱动视图的理念封装
element-ui,即使没有vue的使用经验也能快速上手 - 提供对常见容器化支持
Docker、Kubernetes、Rancher2支持 - 提供
lambda、stream api、webflux的生产实践
官方地址
官网
演示地址
码云后端
码云前端
GitHub后端
GitHub前端
环境需求
| JDK | 1.8 | 强制要求 |
|---|---|---|
| MySQL | 5.7.8 + | 强制要求 |
| Redis | 3.2 + | |
| node | 8.0 + | |
| npm | 6.0 + | |
| IDE | IDEA | 2019+ |
项目结构说明
开源版
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 -- 接口文档 ├── pig-common-sentinel -- sentinel 扩展封装 └── 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]
商业版
pigx ├── pigx-ui -- 前端工程[8080] ├── pigx-auth -- 授权服务提供[3000] ├── pigx-common -- 系统公共模块 ├ ├── pigx-common-bom -- 公共依赖版本 ├ ├── pigx-common-core -- 公共工具类核心包 ├ ├── pigx-common-data -- 数据相关 ├ ├── pigx-common-datasource -- 动态数据源相关 ├ ├── pigx-common-feign -- feign 通用封装 ├ ├── pigx-common-gateway -- 动态路由定义 ├ ├── pigx-common-gray -- 灰度路由控制封装 ├ ├── pigx-common-job -- 定时任务 ├ ├── pigx-common-log -- 日志服务 ├ ├── pigx-common-oss -- 通用文件系统 ├ └── pigx-common-security -- 安全工具类 ├ └── pigx-common-sentinel -- sentinel分装 ├ └── pigx-common-sequence -- 全局发号器 ├ └── pigx-common-swagger -- Swagger Api文档生成 ├ └── pigx-common-transaction -- 分布式事务工具包 ├── pigx-register -- 注册中心、配置中心[8848] ├── pigx-gateway -- Spring Cloud Gateway网关[9999] ├── pigx-upms -- 通用用户权限管理模块 ├ └── pigx-upms-api -- 通用用户权限管理系统公共api模块 ├ └── pigx-upms-biz -- 通用用户权限管理系统业务处理模块[4000] └── pigx-visual -- 图形化模块 ├ ├── pigx-monitor -- Spring Boot Admin监控 [5001] ├ ├── pigx-daemon-elastic-job -- 分布式调度中心[elastic-job 版本] ├ ├── pigx-daemon-quartz -- 分布式调度中心[quartz] ├ └── pigx-code-gen -- 图形化代码生成[5003] ├ └── pigx-sso-client-demo -- sso 客户端接入示例 ├ └── pigx-tx-manager -- pigx分布式事务解决方案[5004] ├ └── pigx-oa-platform -- 工作流模块[5005] ├ └── pigx-pay-platform -- 微信支付宝收单模块[5010] ├ └── pigx-mp-platform -- 微信管理模块[6000] ├ └── pigx-sentinel-dashboard -- sentinel 控制台[5005]
官方技术文档
PigX技术指南V3
2、本机环境安装
后台本地启动步骤
- 安装依赖
- 点击下载:jdk-8u271-windows-x64.exe
- 配置好
JAVA_HOME,CLASSPATH,Path环境变量
- 配置好
- 点击下载:Maven-3.6.3
IEDA配置好Maven全局路径以及Maven加速- 配置好本地
setting.xml文件中的本地仓库路径以及镜像加速
- 点击下载:Node
node -v验证,npm -v验证,(要遵从上述版本要求6.0+)- 安装环境淘宝镜像
npm install -g cnpm --registry=https://registry.npm.taobao.org - 安装
webpack cnpm install webpack -g - 安装
vue脚手架cnpm install vue-cli -g
- 点击下载:jdk-8u271-windows-x64.exe
- 使用
IDE、VSCode载下前后端代码 IDE配置好Maven加速(按需),本地Maven配置好加速(按需)- 安装
Lombok插件 - 配置本地
hosts-
10.10.1.110 pig-mysql 10.10.1.110 pig-redis 10.10.1.110 pig-gateway 10.10.1.110 pig-register 10.10.1.110 pig-sentinel 10.10.1.110 pig-job
-
- 初始化数据库
-
# 版本: mysql5.7.8+ # 默认字符集: utf8mb4 # 默认排序规则: utf8mb4_general_ci # 无需建库,直接导入下载好的pig项目目录下的db文件夹中sql脚本 ├─ pig.sql ├─ pig_config.sql ├─ pig_codegen.sql ├─ pig_job.sql
-
- 修改
Nacos数据库配置并启动该服务
- 修改配置
# 路径 pig/pig-register/src/main/resources/application.yml - 启动服务
- 访问: http://pig-register:8848/nacos (默认账号密码
nacos/nacos)
- 在
Nacos中修改Redis以及数据库连接信息(Nacos上没有IP相关信息,只配置用户名及密码,IP在本地host中修改) - 如果
redis设置了密码,在application-dev.yml中只修改redis连接密码即可,绝对不要添加IP# redis 相关,无密码为空即可,不要修改成IP,修改hosts spring: redis: password:
- 修改数据库连接信息
pig-auth-dev.yml pig-upms-biz.yml pig-codegen-dev.yml # 数据源,只需要修改密码即可,不要修改成IP,修改hosts spring: datasource: username: root password: 11111
- 服务启动顺序
1. pig-register/PigNacosApplication.java 2. pig-gateway/PigGatewayApplication.java 3. pig-auth/PigAuthApplication.java 4. pig-upms-biz/PigAdminApplication # 下述服务按需启动 5. pig-codegen/PigCodeGenApplication 6. pig-monitor/PigMonitorApplication 7. pig-sentinel-dashboard/PigXxlJobAdminApplication 8. pig-xxl-job-admin/PigSentinelApplication
检查Node版本
# 检查node版本 <= 14 node -v # 若高版本node 可执行n 命令切换至 14版本 n 14.16.1
前台本地启动步骤
VSCode打开下载下来的pig-ui前端项目npm install或cnpm install下载依赖npm run dev启动
系统账号说明
[info] 前端默认登录 http://ip:8080
| 用户名 | 密码 |
|---|---|
| admin |
[info] pig-register 注册配置模块 http://ip:8848
| 用户名 | 密码 |
|---|---|
| nacos | nacos |
[info] pig-monitor 监控模块 http://ip:5001
| 用户名 | 密码 |
|---|---|
| pig | pig |
[info] pig-sentinel-dashboard 监控模块 http://ip:5003
| 用户名 | 密码 |
|---|---|
| sentinel | sentinel |
[info] pig-xxl-job-admin 任务调度 http://ip:5004
| 用户名 | 密码 |
|---|---|
| admin |
3、添加业务服务
明天更新~
5、服务器部署
明天更新~
4、开发示例
明天更新~
免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://haidsoft.com/112453.html






