PIG 微服务:国产 Spring Cloud 快速开发平台(OAuth2 + 网关)

2026-06-15 21:00:00

PIG 微服务 开源项目分析

仓库:github.com/pig-mesh/pig · 官网:pig4cloud.com · License: Apache-2.0 · ⭐ 6.6k+

项目是什么

PIG(pig4cloud) 是国产 Spring Cloud 微服务快速开发平台——在 OAuth2 统一认证、网关限流、服务监控、代码生成之上,提供 可运行的微服务骨架,便于扩展 ERP/OA/SaaS 业务服务。

核心组件

组件 说明
pig-auth OAuth2 认证中心
pig-gateway Spring Cloud Gateway
pig-upms 用户权限管理
pig-codegen 代码生成
pig-monitor 服务监控
pig-xxl-job 分布式任务

技术栈

Spring Boot · Spring Cloud · Spring Authorization Server · Vue3 · MyBatis-Plus

与 yudao-cloud / JeecgCloud

项目 特点
PIG 认证/网关/监控 底座清晰,业务需自研
yudao-cloud 自带商城/CRM 等业务模块
JeecgBoot Cloud 低代码 + 微服务

适用场景

  • 构建 多租户 SaaS 中台
  • 已有 Java 微服务经验,要 标准 OAuth2 体系
  • 集成商 统一技术栈 交付多个行业项目

黑豹点评

PIG 是 「微服务基础设施型」 国产开源——不如芋道「模块多」,但 架构干净、适合当企业技术中台起点。与 Nacos、Sentinel 等阿里组件配合成熟;业务域模块需团队自行沉淀。

项目链接https://github.com/pig-mesh/pig