# xuxiaowei-cloud
**Repository Path**: dingjunjun_codeSpace/xuxiaowei-cloud
## Basic Information
- **Project Name**: xuxiaowei-cloud
- **Description**: 基于 JDK 8/11、Spring Boot 2.7.x、OAuth 2.1、Vite 4、Vue 3、Element Plus 的微服务。支持支付宝、钉钉、码云、QQ、微信、企业微信、微博等第三方登录。包含基于 GitLab Runner 的 kubernetes(k8s)、Docker、Shell 等 CI/CD 流水线进行自动构建、制作 Docker 镜像、发布。永久免费开源
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: main
- **Homepage**: https://b23.tv/QmDfw9l
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 51
- **Created**: 2023-04-21
- **Last Updated**: 2023-04-21
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
基于 JDK 8/11、Spring Boot 2.7.x、OAuth 2.1、Vite 4、Vue 3、Element Plus 的微服务。
支持支付宝、钉钉、码云、GitHub、GitLab、QQ、微信、企业微信、微博等第三方登录。
包含基于 GitLab Runner 的 kubernetes(k8s)、Docker、Shell 等执行器执行 CI/CD 流水线进行自动构建、制作 Docker 镜像、发布。
永久免费开源。
为简化开发工作、提高生产率、解决常见问题而生
## 相关项目
- xuxiaowei-cloud-next
- 使用 Spring Boot 3.x.x,将仓库地址后面增加 `-next` 即可(全平台仓库同名)
1. [GitHub](https://github.com/xuxiaowei-cloud/xuxiaowei-cloud-next)
2. [Gitee](https://gitee.com/xuxiaowei-cloud/xuxiaowei-cloud-next)
3. [GitLab](https://gitlab.com/xuxiaowei-cloud/xuxiaowei-cloud-next)
4. [GitCode](https://gitcode.net/xuxiaowei-cloud/xuxiaowei-cloud-next)
5. [GitLink](https://gitlink.org.cn/xuxiaowei-cloud/xuxiaowei-cloud-next)
6. [JiHuLab](https://jihulab.com/xuxiaowei-cloud/xuxiaowei-cloud-next)
## [代码格式规范 spring-javaformat](https://github.com/spring-io/spring-javaformat)
- [代码贡献说明](https://www.yuque.com/xuxiaowei-com-cn/xuxiaowei-cloud/how-to-contribute-code)
- IntelliJ IDEA
-
项目添加 [io.spring.javaformat:spring-javaformat-maven-plugin](https://repo1.maven.org/maven2/io/spring/javaformat/spring-javaformat-maven-plugin)
依赖之后,可安装自动格式化插件(无需运行下列命令):[spring-javaformat-intellij-idea-plugin](https://repo1.maven.org/maven2/io/spring/javaformat/spring-javaformat-intellij-idea-plugin)
```shell
./mvnw spring-javaformat:apply
```
或
```shell
mvn spring-javaformat:apply
```
## [本项目文档](https://www.yuque.com/xuxiaowei-com-cn/xuxiaowei-cloud)
## 依赖版本对比
### 后端
| 依赖 | 本项目版本 | 新版 | 说明 |
|-----------------------------|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|
| spring-boot | v2.7.11 |
| 限制 Spring Boot 2.x,点击查看 Spring Boot 3.x.x 的项目 |
| spring-cloud | v2021.0.6 |
| 限制 Spring Boot 2.x |
| spring-cloud-alibaba | v2021.0.5.0 |
| 限制 Spring Boot 2.x,Spring Cloud Alibaba |
| spring-boot-admin | v2.7.10 |
| 限制 Spring Boot 2.x |
| spring-authorization-server | v0.4.2 |
| 限制 Spring Boot 2.x |
| mybatis | v2.3.0 |
| 限制 Spring Boot 2.x,指 mybatis-spring-boot-starter |
| mybatis-plus | v3.5.3.1 |
| |
| dynamic-datasource | v3.6.1 |
| 指 dynamic-datasource-spring-boot-starter |
| springdoc | 1.7.0 |
| 用于生成 API doc,支持从 javadoc 中获取字段注释 |
| guava | v31.1-jre |
| |
| fastjson | v2.0.27 |
| 使用的是不带英文后缀的版本 |
| hutool | v5.8.17 |
| |
### 前端
| 依赖 | 本项目版本 | 新版 | 说明 |
|----------------------------------|----------|-----------------------------------------------------------------------------|----|
| @element-plus/icons-vue | 2.1.0 |
| |
| @tauri-apps/api | 1.2.0 |
| |
| @toast-ui/editor | 3.2.2 |
| |
| @wangeditor/editor-for-vue | 5.1.12 |
| |
| axios | 1.3.5 |
| |
| crypto-js | 4.1.1 |
| |
| echarts | 5.4.2 |
| |
| element-plus | 2.3.3 |
| |
| js-cookie | 3.0.1 |
| |
| jsencrypt | 3.3.2 |
| |
| pinia | 2.0.34 |
| |
| sockjs-client | 1.6.1 |
| |
| stompjs | 2.3.3 |
| |
| vue | 3.2.47 |
| |
| vue-clipboard3 | 2.0.0 |
| |
| vue-echarts | 6.5.4 |
| |
| vue-router | 4.1.6 |
| |
| | | | |
| @tauri-apps/cli | 1.2.3 |
| |
| @types/crypto-js | 4.1.1 |
| |
| @types/node | 18.15.11 |
| |
| @typescript-eslint/eslint-plugin | 5.58.0 |
| |
| @typescript-eslint/parser | 5.58.0 |
| |
| @vitejs/plugin-vue | 4.1.0 |
| |
| eslint | 8.38.0 |
| |
| eslint-config-standard | 17.0.0 |
| |
| eslint-plugin-import | 2.27.5 |
| |
| eslint-plugin-n | 15.7.0 |
| |
| eslint-plugin-promise | 6.1.1 |
| |
| eslint-plugin-vue | 9.10.0 |
| |
| lint-staged | 13.2.1 |
| |
| terser | 5.16.9 |
| |
| typescript | 5.0.4 |
| |
| unocss | 0.51.2 |
| |
| unplugin-auto-import | 0.15.2 |
| |
| unplugin-vue-components | 0.24.1 |
| |
| vite | 4.2.1 |
| |
| vue-tsc | 1.2.0 |
| |
## 模块
- [依赖分析](./docs/README-dependencies.md)
```
cloud.xuxiaowei
├──xuxiaowei-cloud-starter-parent // 微服务父模块
│ └──gateway // 网关服务
│ └──admin-server // 监控(管理)服务
│ └──passport-ui // 登录服务UI
│ └──passport // 登录服务
│ └──ui // UI
│ └──resource-services-parent // 资源服务父模块
│ └──canal // 阿里巴巴 MySQL binlog 增量订阅、消费服务
│ └──file // 文件服务
│ └──master-data // 主数据服务
│ └──user // 用户服务
│ └──websocket // WebSocket 服务
│ └──webservice // WebService 服务
│ └──wechat-miniprogram // 微信小程序服务
│ └──wechat-offiaccount // 微信公众号服务
│ └──utils // 工具类
│ └──cloud-commons-parent // 微服务公共组件父模块
│ └──cloud-starter-core // 核心组件
│ └──cloud-starter-idempotent // 幂等组件
│ └──cloud-starter-loadbalancer // 负载均衡组件
│ └──cloud-starter-log // 日志组件
│ └──cloud-starter-mybatis // MyBatis 组件
│ └──cloud-starter-oauth2 // OAuth2 组件
│ └──cloud-starter-openfeign // OpenFeign 组件
│ └──cloud-starter-redis // Redis 组件
│ └──cloud-starter-session-redis // Session Redis 组件
│ └──cloud-starter-validation // 验证组件
│ └──xxl-job-admin // XXL JOB Admin
│ └──example-parent // 示例模块(独立模块)
│ └──oauth2-client // OAuth 2.0 客户端(独立服务)
│ └──cxf-client // CXF 2.0 客户端(独立服务)
```
### 端口
- 注意:本项目主要使用 `IDEA`
编写,为了方便,引入了环境变量插件 [EnvFile](https://plugins.jetbrains.com/plugin/7861-envfile),[环境变量文件](./.env.dev)
,如果需要调整,请自行修改该文件或删除
| 模块 | 模块名称 | 域名(虚拟) | 端口 | kubernetes Service 端口 |
|--------------------|-----------------------------|----------------------------------------|-------|-----------------------|
| Nacos | 注册、配置中心 | nacos.example.xuxiaowei.cloud | 8848 | 30848/31848 |
| MySQL | 数据库 | mysql.example.xuxiaowei.cloud | 3306 | 30306 |
| Redis | 数据库 | redis.example.xuxiaowei.cloud | 6379 | 30379 |
| canal-deployer | 阿里巴巴 MySQL binlog 增量订阅&消费组件 | canal-deployer.example.xuxiaowei.cloud | 11111 | 暂未部署 |
| sentinel-dashboard | 流控防护组件 | | 22222 | 32222 |
| | | | | |
| ui | UI | example.xuxiaowei.cloud | 1001 | 30180 |
| gateway | 网关 | gateway.example.xuxiaowei.cloud | 1101 | 31101 |
| admin-server | 监控(管理) | admin-server.example.xuxiaowei.cloud | 1201 | 31201 |
| passport | 登录 | passport.example.xuxiaowei.cloud | 1401 | 31401 |
| passport-ui | 登录UI | passport.example.xuxiaowei.cloud | 1411 | 放在 passport 中部署 |
| canal | 阿里巴巴 MySQL binlog 增量订阅、消费服务 | | 1601 | 31601 |
| user | 用户服务 | | 1701 | 31701 |
| websocket | WebSocket 服务 | | 1801 | 31801 |
| webservice | WebService 服务 | | 1901 | 31901 |
| wechat-miniprogram | 微信小程序服务 | | 2001 | 32001 |
| wechat-offiaccount | 微信公众号服务 | | 2101 | 32101 |
| master-data | 主数据服务 | | 2201 | 32201 |
| file | 文件服务 | | 2301 | 32301 |
| xxl-job-admin | XXL Job Admin | | 5101 | 30101 |
| | | | | |
| oauth2-client | OAuth 2.0 客户端(独立服务) | | 10001 | 以下是仅用于测试的客户端,无需部署 |
| cxf-client | CXF 客户端(独立服务) | | 10002 | |
- 流控防护限流端口
| 模块 | 模块名称 | 限流端口 |
|--------------------|---------------|------|
| gateway | 网关 | 9001 |
| passport | 登录 | 9002 |
| user | 用户服务 | 9003 |
| websocket | WebSocket 服务 | 9004 |
| webservice | WebService 服务 | 9005 |
| wechat-miniprogram | 微信小程序服务 | 9006 |
| wechat-offiaccount | 微信公众号服务 | 9007 |
| master-data | 主数据服务 | 9008 |
| file | 文件服务 | 9009 |
### 租户、用户名与密码
| 租户ID | 租户名 | 账户名/用户名 | 密码 | 启用 | 说明 |
|------|------------|-------------|-----|----|---------------|
| 1 | 徐晓伟工作室(默认) | xuxiaowei | 123 | 1 | |
| 1 | 徐晓伟工作室(默认) | xuxiaowei-2 | 123 | 1 | 相同组织不能有重复的用户名 |
| 2 | 青岛XX公司 | xuxiaowei | 123 | 1 | 不同组织可以有相同的用户名 |
| 3 | 上海XX公司 | zhangsan | 123 | 1 | |
### 其他服务
| 名称 | 地址 | 账户名 | 密码 |
|------------------|-----------------------------------------------------|-------|-----------|
| XXL Job | http://127.0.0.1:5101/xxl-job-admin | admin | 123456 |
| 网关 Swagger | http://127.0.0.1:1101/webjars/swagger-ui/index.html | | |
| 服务 Swagger | http://127.0.0.1:端口/swagger-ui/index.html | | |
| docker 守护程序的 URL | http://host.docker.example.xuxiaowei.cloud:2375 | | |
| docker 私库 URL | registry.docker.example.xuxiaowei.cloud | admin | xuxiaowei |
### [权限](docs/README-authority.md)
### 租户、客户ID与秘钥
| tenant_id | tenant_name | | id | client_id | client_id_issued_at | client_secret | client_secret_expires_at | client_authentication_methods | authorization_grant_types | redirect_uris | scopes | require-authorization-consent | authorization-code-time-to-live | access-token-time-to-live | refresh-token-time-to-live | reuse-refresh-tokens | id-token-signature-algorithm | token-endpoint-authentication-signing-algorithm | access-token-format |
|-----------|-------------|-------------------------------|----|----------------------------------------------|---------------------|--------------------------------------------------|--------------------------|----------------------------------------|--------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------|-------------------------------|---------------------------------|---------------------------|----------------------------|----------------------|------------------------------|-------------------------------------------------|---------------------|
| 租户ID | 租户名 | 说明 | 主键 | 客户ID | 客户ID发布时间 | 客户秘钥 | 客户秘钥过期时间 | 授权认证方法 | 授权类型 | 授权码重定向地址 | 范围 | 是否需要客户授权同意 | 授权code有效时间 | 授权Token有效时间 | 刷新Token有效时间 | 重复使用刷新Token | 授权Token签名算法 | private_key_jwt、client_secret_jwt 算法 | 授权Token的格式 |
| 1 | 徐晓伟工作室(默认) | 网站 | 1 | xuxiaowei_client_id | 2022-05-30 17:17:41 | xuxiaowei_client_secret | | client_secret_post,client_secret_basic | refresh_token,implicit,client_credentials,authorization_code | http://127.0.0.1:1401/code/xuxiaowei_client_id,http://gateway.example.xuxiaowei.cloud:1101/passport/code/xuxiaowei_client_id,https://gateway.example.xuxiaowei.cloud/passport/code/xuxiaowei_client_id | snsapi_base,snsapi_info | false | 300 | 43200 | 2592000 | true | RS256 | | self-contained |
| 1 | 徐晓伟工作室(默认) | 微信小程序使用 | 2 | xuxiaowei_client_wechat_miniprogram_id | 2022-05-30 17:17:41 | xuxiaowei_client_wechat_miniprogram_secret | | client_secret_post,client_secret_basic | refresh_token,wechat_miniprogram | | snsapi_base,snsapi_info | false | 300 | 43200 | 2592000 | true | RS256 | | self-contained |
| 1 | 徐晓伟工作室(默认) | 微信公众号使用 | 3 | xuxiaowei_client_wechat_offiaccount_id | 2022-05-30 17:17:41 | xuxiaowei_client_wechat_offiaccount_secret | | client_secret_post,client_secret_basic | refresh_token,wechat_offiaccount | | snsapi_base,snsapi_info | false | 300 | 43200 | 2592000 | true | RS256 | | self-contained |
| 1 | 徐晓伟工作室(默认) | 微信扫码使用 | 4 | xuxiaowei_client_wechat_oplatform_id | 2022-05-30 17:17:41 | xuxiaowei_client_wechat_oplatform_secret | | client_secret_post,client_secret_basic | refresh_token,wechat_oplatform_website | | snsapi_base,snsapi_info | false | 300 | 43200 | 2592000 | true | RS256 | | self-contained |
| 1 | 徐晓伟工作室(默认) | 码云Gitee使用 | 5 | xuxiaowei_client_gitee_id | 2022-05-30 17:17:41 | xuxiaowei_client_gitee_secret | | client_secret_post,client_secret_basic | refresh_token,gitee | | snsapi_base,snsapi_info | false | 300 | 43200 | 2592000 | true | RS256 | | self-contained |
| 1 | 徐晓伟工作室(默认) | QQ扫码使用 | 6 | xuxiaowei_client_qq_website_id | 2022-05-30 17:17:41 | xuxiaowei_client_qq_website_secret | | client_secret_post,client_secret_basic | refresh_token,qq_website | | snsapi_base,snsapi_info | false | 300 | 43200 | 2592000 | true | RS256 | | self-contained |
| 1 | 徐晓伟工作室(默认) | 微博扫码使用 | 7 | xuxiaowei_client_weibo_id | 2022-05-30 17:17:41 | xuxiaowei_client_weibo_secret | | client_secret_post,client_secret_basic | refresh_token,weibo_website | | snsapi_base,snsapi_info | false | 300 | 43200 | 2592000 | true | RS256 | | self-contained |
| 1 | 徐晓伟工作室(默认) | gitlab使用 | 8 | xuxiaowei_client_gitlab_id | 2022-05-30 17:17:41 | xuxiaowei_client_gitlab_secret | | client_secret_post,client_secret_basic | refresh_token,gitlab | | snsapi_base,snsapi_info | false | 300 | 43200 | 2592000 | true | RS256 | | self-contained |
| 1 | 徐晓伟工作室(默认) | 企业微信扫码使用 | 9 | xuxiaowei_client_wechat_work_website_id | 2022-05-30 17:17:41 | xuxiaowei_client_wechat_work_website_secret | | client_secret_post,client_secret_basic | refresh_token,wechat_work_website | | snsapi_base,snsapi_info | false | 300 | 43200 | 2592000 | true | RS256 | | self-contained |
| 1 | 徐晓伟工作室(默认) | github使用 | 10 | xuxiaowei_client_github_id | 2022-05-30 17:17:41 | xuxiaowei_client_github_secret | | client_secret_post,client_secret_basic | refresh_token,github | | snsapi_base,snsapi_info | false | 300 | 43200 | 2592000 | true | RS256 | | self-contained |
| 1 | 徐晓伟工作室(默认) | 钉钉dingtalk使用 | 11 | xuxiaowei_client_dingtalk_id | 2022-05-30 17:17:41 | xuxiaowei_client_dingtalk_secret | | client_secret_post,client_secret_basic | refresh_token,dingtalk | | snsapi_base,snsapi_info | false | 300 | 43200 | 2592000 | true | RS256 | | self-contained |
| 1 | 徐晓伟工作室(默认) | QQ小程序使用 | 12 | xuxiaowei_client_qq_miniprogram_id | 2022-05-30 17:17:41 | xuxiaowei_client_qq_miniprogram_secret | | client_secret_post,client_secret_basic | refresh_token,qq_miniprogram | | snsapi_base,snsapi_info | false | 300 | 43200 | 2592000 | true | RS256 | | self-contained |
| 1 | 徐晓伟工作室(默认) | 支付宝小程序使用 | 13 | xuxiaowei_client_alipay_miniprogram_id | 2022-05-30 17:17:41 | xuxiaowei_client_alipay_miniprogram_secret | | client_secret_post,client_secret_basic | refresh_token,alipay_miniprogram | | snsapi_base,snsapi_info | false | 300 | 43200 | 2592000 | true | RS256 | | self-contained |
| 1 | 徐晓伟工作室(默认) | 支付宝网站应用使用 | 14 | xuxiaowei_client_alipay_oplatform_website_id | 2022-05-30 17:17:41 | xuxiaowei_client_alipay_oplatform_website_secret | | client_secret_post,client_secret_basic | refresh_token,alipay_oplatform_website | | snsapi_base,snsapi_info | false | 300 | 43200 | 2592000 | true | RS256 | | self-contained |
| 1 | 徐晓伟工作室(默认) | 飞书网页应用使用 | 15 | xuxiaowei_client_feishu_webpage_id | 2022-05-30 17:17:41 | xuxiaowei_client_feishu_webpage_secret | | client_secret_post,client_secret_basic | refresh_token,feishu_webpage | | snsapi_base,snsapi_info | false | 300 | 43200 | 2592000 | true | RS256 | | self-contained |
| 1 | 徐晓伟工作室(默认) | 使用 client_secret_jwt 验证客户凭证使用 | 16 | xuxiaowei_client_client_secret_jwt_id | 2022-05-30 17:17:41 | 6c63d616146a4c3db7d0d2f3ec6d93ce | | client_secret_jwt | client_credentials | | snsapi_base,snsapi_info | false | 300 | 43200 | 2592000 | true | RS256 | HS256 | self-contained |
| 2 | 青岛XX公司 | 网站 | 17 | tenant_id_1_client_id | 2022-05-30 17:17:41 | tenant_id_1_client_secret | | client_secret_post,client_secret_basic | refresh_token,implicit,client_credentials,authorization_code | http://127.0.0.1:1401/code/tenant_id_1_client_id,http://gateway.example.xuxiaowei.cloud:1101/passport/code/tenant_id_1_client_id,https://gateway.example.xuxiaowei.cloud/passport/code/tenant_id_1_client_id | snsapi_base,snsapi_info | false | 300 | 43200 | 2592000 | true | RS256 | | self-contained |
| 3 | 上海XX公司 | 网站 | 18 | tenant_id_2_client_id | 2022-05-30 17:17:41 | tenant_id_2_client_secret | | client_secret_post,client_secret_basic | refresh_token,implicit,client_credentials,authorization_code | http://127.0.0.1:1401/code/tenant_id_2_client_id,http://gateway.example.xuxiaowei.cloud:1101/passport/code/tenant_id_2_client_id,https://gateway.example.xuxiaowei.cloud/passport/code/tenant_id_2_client_id | snsapi_base,snsapi_info | false | 300 | 43200 | 2592000 | true | RS256 | | self-contained |
- authorization_grant_types
- 授权码模式 authorization_code
- 刷新Token权限 refresh_token
- 客户端凭证模式 client_credentials
- 密码模式 password
- 简化模式 implicit
- 微信小程序(个人开发适配 OAuth 2.1、微信小程序的授权方式) wechat_miniprogram
- 微信公众号(个人开发适配 OAuth 2.1、微信公众号的授权方式) wechat_offiaccount
- 微信扫码(个人开发适配 OAuth 2.1、微信扫码的授权方式) wechat_oplatform_website
- 码云(个人开发适配 OAuth 2.1、码云的授权方式) gitee
- QQ扫码(个人开发适配 OAuth 2.1、QQ扫码的授权方式) qq_website
- 微博扫码(个人开发适配 OAuth 2.1、微博扫码的授权方式) weibo_website
- gitlab授权(个人开发适配 OAuth 2.1、gitlab的授权方式) gitlab
- 企业微信扫码(个人开发适配 OAuth 2.1、企业微信扫码的授权方式) wechat_work_website
- github授权(个人开发适配 OAuth 2.1、gitlab的授权方式) github
- 钉钉dingtalk扫码(个人开发适配 OAuth 2.1、钉钉dingtalk扫码的授权方式) dingtalk
- 支付宝小程序(个人开发适配 OAuth 2.1、支付宝小程序的授权方式) alipay_miniprogram
- 支付宝网站应用(个人开发适配 OAuth 2.1、支付宝网站应用的授权方式) alipay_oplatform_website
## 仓库与分支?
1. 使用了哪六个仓库?
1. [JiHuLab](https://jihulab.com/xuxiaowei-cloud/xuxiaowei-cloud)
2. [Gitee](https://gitee.com/xuxiaowei-cloud/xuxiaowei-cloud)
3. [GitCode](https://gitcode.net/xuxiaowei-cloud/xuxiaowei-cloud)
4. [GitHub](https://github.com/xuxiaowei-cloud/xuxiaowei-cloud)
5. [GitLab](https://gitlab.com/xuxiaowei-cloud/xuxiaowei-cloud)
6. [GitLink](https://gitlink.org.cn/xuxiaowei-cloud/xuxiaowei-cloud)
2. 上述六个仓库以哪个为准?其余仓库何时同步?
1. 以 [JiHuLab](https://jihulab.com/xuxiaowei-cloud/xuxiaowei-cloud) 为准
2. 其余仓库每日同步
3. 各个仓库的作用?
| 仓库地址 | 作用 | 说明 |
|-------------------------------------------------------------------|-----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
| [极狐 JiHuLab](https://jihulab.com/xuxiaowei-cloud/xuxiaowei-cloud) | 供国内用户访问、提问、下载资源、GitLab Runner CI/CD 流水线打包/制作Docker镜像、Kubernetes(k8s) 发布项目使用 | 开源项目 [免费使用 GitLab Runner](https://forum.gitlab.cn/t/topic/1527) |
| [码云 Gitee](https://gitee.com/xuxiaowei-cloud/xuxiaowei-cloud) | 国内备份仓库 | 由于技术栈(项目使用 GitLab Runner CI/CD 流水线测试与发布)及不可抗力的因素,将来会关闭 Gitee 的 issues,并将历史数据迁移到 [极狐 JiHuLab](https://jihulab.com/xuxiaowei-cloud/xuxiaowei-cloud) |
| [GitLab](https://gitlab.com/xuxiaowei-cloud/xuxiaowei-cloud) | 国外备份仓库,国外流水线测试 | 免费额度 `400` 分钟,每月后期可能由于免费额度用完而失败 |
| [GitCode](https://gitcode.net/xuxiaowei-cloud/xuxiaowei-cloud) | 国内备份仓库,国内流水线测试 | 流水线配额 `2000` 分钟,申请内侧资格 |
| [GitHub](https://github.com/xuxiaowei-cloud/xuxiaowei-cloud) | 国外备份仓库 | 使用 [CodeQL](https://github.com/xuxiaowei-cloud/xuxiaowei-cloud/actions/workflows/codeql.yml) 每日扫描项目中的 `main` 分支是否存在漏洞 |
| [GitLink](https://gitlink.org.cn/xuxiaowei-cloud/xuxiaowei-cloud) | 国内备份仓库 | |
1. 各分支的作用?
1. `main`
- 主分支
- 不可推送,只能合并
- 用于 GitLab Runner 的 kubernetes(k8s) 类型的执行器执行 CI/CD
- 使用 kubernetes(k8s) 编译代码打包
- 使用 kubernetes(k8s) 将打包后的jar包制作成docker镜像
- 使用 kubernetes(k8s) 进行发布
2. `xuxiaowei`开头的分支
- 个人分支,按功能`PR`到主分支`main`
3. `shell`
- 用于 GitLab Runner 的 shell 类型的执行器执行 CI/CD
- 使用 shell 命令编译代码打包
- 使用 shell 命令创建 Linux service 服务进行发布
4. `docker`
- 用于 GitLab Runner 的 docker 类型的执行器执行 CI/CD
- 使用 docker 编译代码打包
- 使用 docker 将打包后的jar包制作成docker镜像
- 使用 docker 进行发布
5. `pages`
- 文档分支
6. `OAuth2.0`
- 历史版本分支,使用 OAuth 2.0 进行授权,后续不再维护(主分支使用 OAuth 2.1)
7. `only-passport`
- 删除了`passport-ui`模块,在`passport`中使用`CDN`引入`element-plus`、`vue`进行网页编写(不推荐,后续不再维护)
8. 此处未说明的分支,请勿使用
9. 已上包含 CI/CD 的分支
1. 分支内的各阶段,可交替使用,如:使用 docker 编译代码打包、使用 docker 将打包后的jar包制作成docker镜像,使用
kubernetes(k8s) 进行发布。如何选择请使用者自行组合。
2. 这些分支代码相同,CI/CD 根据分支名进行触发,即:想使用某个分支的某些执行器执行 CI/CD,就将代码 `PR`
(推荐使用PR,方便一键回滚代码、将回滚的内容进行恢复) 到指定的分支。
## 鸣谢
1. 感谢 [](https://www.murphysec.com/) 提供安全技术支持
2. 感谢 [](https://www.jetbrains.com/)
提供开发工具 [](https://www.jetbrains.com/idea) 的免费授权
## Stargazers over time
[](https://starchart.cc/xuxiaowei-cloud/xuxiaowei-cloud)