✨ [2025-05-23] 梳理使用文档
All checks were successful
Publish to Confluence / confluence (push) Successful in 1m32s
All checks were successful
Publish to Confluence / confluence (push) Successful in 1m32s
This commit is contained in:
parent
7084267aea
commit
d0545d80ff
@ -50,6 +50,8 @@
|
|||||||
|
|
||||||
|
|
||||||
### Shopee
|
### Shopee
|
||||||
|
- 需要先注册账号
|
||||||
|
- 
|
||||||
|
|
||||||
### Lazada
|
### Lazada
|
||||||
- 发布教程:https://www.yuque.com/lazadasellerservicemarket/hoafmn/qyldgaxgtfsm5om6?singleDoc#%20%E3%80%8A%E5%BC%80%E6%94%BE%E5%B9%B3%E5%8F%B0%E5%95%86%E7%94%A8APPKEY%E5%8F%91%E5%B8%83%E8%87%B3%E6%9C%8D%E5%8A%A1%E5%B8%82%E5%9C%BA%E6%95%99%E7%A8%8B%E3%80%8B
|
- 发布教程:https://www.yuque.com/lazadasellerservicemarket/hoafmn/qyldgaxgtfsm5om6?singleDoc#%20%E3%80%8A%E5%BC%80%E6%94%BE%E5%B9%B3%E5%8F%B0%E5%95%86%E7%94%A8APPKEY%E5%8F%91%E5%B8%83%E8%87%B3%E6%9C%8D%E5%8A%A1%E5%B8%82%E5%9C%BA%E6%95%99%E7%A8%8B%E3%80%8B
|
||||||
@ -62,4 +64,5 @@
|
|||||||
- 第三步需要开发介入
|
- 第三步需要开发介入
|
||||||
|
|
||||||
### Amazon
|
### Amazon
|
||||||
|
- 需要重新注册账号
|
||||||
|
- 
|
||||||
|
@ -24,8 +24,7 @@
|
|||||||
# engine-starter-redis 使用教程
|
# engine-starter-redis 使用教程
|
||||||
|
|
||||||
> 基于 Redis 的各种工具封装
|
> 基于 Redis 的各种工具封装
|
||||||
> 具体使用可参考 [engine-sample > engine-sample-starter-redis](../engine-sample/engine-sample-starter-redis)
|
> 具体使用可参考 [engine-sample > engine-sample-starter-redis](../engine-sample/engine-sample-starter-redis)
|
||||||
> 版本要求:`$verison >= 1.0.14-SNAPSHOT`
|
|
||||||
|
|
||||||
## 功能特性
|
## 功能特性
|
||||||
|
|
||||||
@ -50,7 +49,7 @@
|
|||||||
|
|
||||||
### 添加依赖
|
### 添加依赖
|
||||||
|
|
||||||
**注意:** `qifu-saas-parent` 版本需要高于 `1.0.14-SNAPSHOT`
|
**注意:** `qifu-saas-parent >= 1.0.14-SNAPSHOT`
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
|
|
||||||
@ -60,11 +59,13 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
### 使用工具
|
-----------
|
||||||
|
|
||||||
|
## 使用工具
|
||||||
|
|
||||||
除了 spring-cache 和 RedisMessageListener 默认关闭之外,别的功能都是默认开启的,开箱即用
|
除了 spring-cache 和 RedisMessageListener 默认关闭之外,别的功能都是默认开启的,开箱即用
|
||||||
|
|
||||||
#### 幂等工具使用
|
### 幂等工具使用
|
||||||
|
|
||||||
```java
|
```java
|
||||||
public class Usage {
|
public class Usage {
|
||||||
@ -79,7 +80,7 @@ public class Usage {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 限流工具使用
|
### 限流工具使用
|
||||||
|
|
||||||
```java
|
```java
|
||||||
public class Usage {
|
public class Usage {
|
||||||
@ -91,7 +92,7 @@ public class Usage {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 分布式锁工具使用
|
### 分布式锁工具使用
|
||||||
|
|
||||||
```java
|
```java
|
||||||
public class Usage {
|
public class Usage {
|
||||||
@ -143,9 +144,9 @@ public class Usage {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### 缓存工具使用
|
### 缓存工具使用
|
||||||
|
|
||||||
##### 开启Redis缓存
|
#### 开启Redis缓存
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
yuanmeng:
|
yuanmeng:
|
||||||
@ -154,7 +155,7 @@ yuanmeng:
|
|||||||
enable: true
|
enable: true
|
||||||
```
|
```
|
||||||
|
|
||||||
##### 使用缓存工具
|
#### 使用缓存工具
|
||||||
|
|
||||||
```java
|
```java
|
||||||
public class Usage {
|
public class Usage {
|
||||||
@ -167,9 +168,9 @@ public class Usage {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### RedisMessageListener工具使用
|
### RedisMessageListener工具使用
|
||||||
|
|
||||||
##### 开启Redis消息
|
#### 开启Redis消息
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
yuanmeng:
|
yuanmeng:
|
||||||
@ -178,7 +179,7 @@ yuanmeng:
|
|||||||
enable: true
|
enable: true
|
||||||
```
|
```
|
||||||
|
|
||||||
##### 使用消息工具
|
#### 使用消息工具
|
||||||
|
|
||||||
```java
|
```java
|
||||||
|
|
||||||
|
@ -24,8 +24,7 @@
|
|||||||
# engine-starter-feign 使用教程
|
# engine-starter-feign 使用教程
|
||||||
|
|
||||||
> 基于 Feign 的通用封装
|
> 基于 Feign 的通用封装
|
||||||
> 具体使用可参考 [engine-sample > engine-sample-starter-web](../engine-sample/engine-sample-starter-web)
|
> 具体使用可参考 [engine-sample > engine-sample-starter-web](../engine-sample/engine-sample-starter-web)
|
||||||
> 版本要求:`$verison >= 1.1.0-SNAPSHOT`
|
|
||||||
|
|
||||||
## 功能特性
|
## 功能特性
|
||||||
|
|
||||||
@ -37,7 +36,7 @@
|
|||||||
|
|
||||||
## 快速使用
|
## 快速使用
|
||||||
|
|
||||||
- **注意:** `qifu-saas-parent` 版本需要高于 `1.1.0-SNAPSHOT`
|
- **注意:** `qifu-saas-parent >= 1.1.0-SNAPSHOT`
|
||||||
- **注意:** 启动类 `@ComponentScan` 需要变更为如下形式
|
- **注意:** 启动类 `@ComponentScan` 需要变更为如下形式
|
||||||
- ```java
|
- ```java
|
||||||
@ComponentScan(value = "com.yuanmeng.*",
|
@ComponentScan(value = "com.yuanmeng.*",
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
|
|
||||||
> 基于 web 的各种工具封装
|
> 基于 web 的各种工具封装
|
||||||
> 具体使用可参考 [engine-sample > engine-sample-starter-web](../engine-sample/engine-sample-starter-web)
|
> 具体使用可参考 [engine-sample > engine-sample-starter-web](../engine-sample/engine-sample-starter-web)
|
||||||
> 版本要求:`$verison >= 1.1.0-SNAPSHOT`
|
|
||||||
> 去除 security 相关配置
|
> 去除 security 相关配置
|
||||||
|
|
||||||
## 功能特性
|
## 功能特性
|
||||||
@ -48,7 +47,7 @@
|
|||||||
|
|
||||||
## 快速使用
|
## 快速使用
|
||||||
|
|
||||||
- **注意:** `qifu-saas-parent` 版本需要高于 `1.1.0-SNAPSHOT`
|
- **注意:** `qifu-saas-parent >= 1.1.0-SNAPSHOT`
|
||||||
- **注意:** `pom.xml` 中 `engine-starter-web` 依赖要置于 `web-core` 和 `oauth2-core` 之前
|
- **注意:** `pom.xml` 中 `engine-starter-web` 依赖要置于 `web-core` 和 `oauth2-core` 之前
|
||||||
- **注意:** 启动类 `@ComponentScan` 需要变更为如下形式
|
- **注意:** 启动类 `@ComponentScan` 需要变更为如下形式
|
||||||
- ```java
|
- ```java
|
||||||
@ -66,7 +65,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
- **注意:** 引入 `engine-starter-web` 后可以移除 `web-core` 和 `oauth2-core` 依赖。但是 `SecurityUtils` 需要改为
|
- **(可选操作)** 引入 `engine-starter-web` 后可以移除 `web-core` 和 `oauth2-core` 依赖。但是 `SecurityUtils` 需要改为
|
||||||
`YmSecurityUtils`
|
`YmSecurityUtils`
|
||||||
|
|
||||||
### 添加依赖
|
### 添加依赖
|
||||||
@ -79,7 +78,7 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
----
|
||||||
|
|
||||||
## 使用工具
|
## 使用工具
|
||||||
|
|
||||||
@ -109,21 +108,25 @@ public class Usage {
|
|||||||
|
|
||||||
@GetMapping("/exception")
|
@GetMapping("/exception")
|
||||||
public String exception() {
|
public String exception() {
|
||||||
|
// 打印error日志,触发告警
|
||||||
throw new RuntimeException("exception");
|
throw new RuntimeException("exception");
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/ym-exception")
|
@GetMapping("/ym-exception")
|
||||||
public String ymException() {
|
public String ymException() {
|
||||||
|
// 打印error日志,触发告警
|
||||||
throw new YmException("ym exception");
|
throw new YmException("ym exception");
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/ym-biz-exception")
|
@GetMapping("/ym-biz-exception")
|
||||||
public String ymBizException() {
|
public String ymBizException() {
|
||||||
|
// 打印 warning 日志
|
||||||
throw new YmBizException(YmResultCode.BASE_ERROR);
|
throw new YmBizException(YmResultCode.BASE_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/ym-biz-data-exception")
|
@GetMapping("/ym-biz-data-exception")
|
||||||
public String ymBizDataException() {
|
public String ymBizDataException() {
|
||||||
|
// 打印 info 日志
|
||||||
throw new YmBizDataException(YmResultCode.BASE_ERROR,
|
throw new YmBizDataException(YmResultCode.BASE_ERROR,
|
||||||
new TestData(TestStatusEnum.SUCCESS.getCode(), "1"));
|
new TestData(TestStatusEnum.SUCCESS.getCode(), "1"));
|
||||||
}
|
}
|
||||||
@ -131,6 +134,7 @@ public class Usage {
|
|||||||
@YmAutofillResp
|
@YmAutofillResp
|
||||||
@GetMapping("/ym-biz-data-exception-fill")
|
@GetMapping("/ym-biz-data-exception-fill")
|
||||||
public String ymBizDataExceptionFill() {
|
public String ymBizDataExceptionFill() {
|
||||||
|
// 触发结果数据自动填充
|
||||||
throw new YmBizDataException(YmResultCode.BASE_ERROR,
|
throw new YmBizDataException(YmResultCode.BASE_ERROR,
|
||||||
new TestData(TestStatusEnum.SUCCESS.getCode(), "1"));
|
new TestData(TestStatusEnum.SUCCESS.getCode(), "1"));
|
||||||
}
|
}
|
||||||
@ -150,7 +154,7 @@ yuanmeng:
|
|||||||
```
|
```
|
||||||
|
|
||||||
- 添加国际化文件
|
- 添加国际化文件
|
||||||
- 默认 `resources > i18n > messages_zh_CN.properties`
|
- 默认 `resources > i18n > messages_zh_CN.properties`
|
||||||
|
|
||||||
```properties
|
```properties
|
||||||
Base\ Error=服务端错误
|
Base\ Error=服务端错误
|
||||||
@ -173,6 +177,7 @@ public String i18nIgnore() {
|
|||||||
|
|
||||||
@GetMapping("/i18n-error")
|
@GetMapping("/i18n-error")
|
||||||
public String i18nError() {
|
public String i18nError() {
|
||||||
|
// 触发国际化配置
|
||||||
throw new YmBizException(YmResultCode.BASE_ERROR);
|
throw new YmBizException(YmResultCode.BASE_ERROR);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -76,4 +76,15 @@
|
|||||||
- 也可以直接命令行(阿里云镜像): `--index sparse+https://mirrors.aliyun.com/crates.io-index/`
|
- 也可以直接命令行(阿里云镜像): `--index sparse+https://mirrors.aliyun.com/crates.io-index/`
|
||||||
- ```shell
|
- ```shell
|
||||||
RUN set -eux && cargo install --index sparse+https://mirrors.aliyun.com/crates.io-index/ --locked monolith
|
RUN set -eux && cargo install --index sparse+https://mirrors.aliyun.com/crates.io-index/ --locked monolith
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 修改 Dockerfile 中的 APT 源
|
||||||
|
```dockerfile
|
||||||
|
RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
|
||||||
|
```
|
||||||
|
|
||||||
|
## 修改 Dockerfile 中的 pip 源
|
||||||
|
```dockerfile
|
||||||
|
RUN pip3 install -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple -U pip
|
||||||
|
RUN pip3 config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
|
||||||
|
```
|
Loading…
x
Reference in New Issue
Block a user