clay commit : ci/cd相关软件安装
continuous-integration/drone/push Build is passing Details

This commit is contained in:
clay 2022-11-10 18:58:44 +08:00
parent 610d1856a0
commit e83d809db9
8 changed files with 133 additions and 0 deletions

View File

@ -52,6 +52,18 @@ module.exports = {
'/wiki/back-build/'
] // 根据自己的需求来订对应自己在docs下的文件夹名默认首页是README.md
},
// {
// title: '模块介绍',
// collapsable: false,
// children: [
// '/module/',
// '/module/gateway/',
// '/module/auth/',
// '/module/umps/',
// '/module/common/',
// '/module/visual/',
// ] // 根据自己的需求来订对应自己在docs下的文件夹名默认首页是README.md
// },
{
title: 'CI/CD',
collapsable: false,

21
docs/module/README.md Normal file
View File

@ -0,0 +1,21 @@
# 模块信息
> 以下是security-cloud所以模块,本章节将对其中的每一个模块进行详细的介绍。
```lua
security-cloud
├── auth -- 授权服务模块
├── gateway -- 网关服务模块
└── common -- 系统公共模块
├── common-core -- 公共工具类核心包
├── common-mybatis -- mybatis 扩展封装
├── common-security -- 安全工具类
├── common-swagger -- 接口文档
├── common-feign -- feign 扩展封装
└── common-log -- 系统日志记录
└── upms -- 通用用户权限管理模块
└── upms-api -- 通用用户权限管理系统公共api模块
└── upms-biz -- 通用用户权限管理系统业务处理模块[4000]
└── visual -- 图形化管理模块
└── monitor -- 服务监控
└── codegen -- 图形化代码生成
```

View File

@ -0,0 +1 @@
# 授权服务模块

View File

@ -0,0 +1 @@
# 系统公共模块

View File

@ -0,0 +1,10 @@
# 网关服务模块
security-cloud使用spring官方的网关主键,spring gateway。
## 路由配置

View File

@ -0,0 +1,86 @@
# 网关服务模块
在集群环境中gateway将会是集群网络的唯一出入口是系统安全的重要节点同时gateway承担Sentinel限流服务分发负载均衡和提供swagger文档等工作。
## 文件结构
```lua
gateway
└── java
├── config -- 配置包
├── controller -- swagger聚合需要使用的到的接口
├── filter -- 全局过滤器
├── handler -- 异常处理
├── util -- 工具
└── GatewayApplication.java -- 启动类
└── resources
├── bootstrap.yml -- 配置文件
└── logback-spring.xml -- 日志记录文件
```
## 配置文件
```yaml
# Tomcat
server:
port: 5000
# Spring
spring:
application:
# 应用名称
name: monitor
profiles:
# 环境配置
active: local
security:
user:
name: root
password: password
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: 192.168.101.108:8848
username: nacos
password: nacos
namespace: ${spring.profiles.active}
metadata:
management:
context-path: /actuator
config:
# 配置中心地址
server-addr: ${spring.cloud.nacos.discovery.server-addr}
file-extension: yaml
namespace: ${spring.profiles.active}
shared-configs:
- ${spring.application.name}-${spring.profiles.active}.yml
```
配置文件相当简洁,主要为设置运行端口,active的环境以及注册到nacos,并从nacos读取到gateway自身的配置文件
属于gateway的配置文件:
```yaml
spring:
cloud:
gateway:
discovery:
locator:
# gateway 能够进行服务发现
enabled: true
routes:
# 认证中心
- id: auth
uri: lb://auth
predicates:
- Path=/auth/**
```
## 路由分发
路由分发是gateway的一个重要功能,当gateway启动后会向nacos发起注册,并从nacos cconfig中心获取到gateway的那一份配置文件,gateway再将文件加载到自己的路由中,当又接口请求到后,gateway则可以根据路由表对请求进行分发。
gateway中配置了全局路由器,对

View File

@ -0,0 +1 @@
# 通用用户权限管理模块

View File

@ -0,0 +1 @@
# 图形化管理模块