[2025-05-23] 梳理使用文档
All checks were successful
Publish to Confluence / confluence (push) Successful in 1m32s

This commit is contained in:
liuxiaohua 2025-05-23 15:49:26 +08:00
parent 7084267aea
commit d0545d80ff
5 changed files with 42 additions and 23 deletions

View File

@ -50,6 +50,8 @@
### Shopee
- 需要先注册账号
- ![](https://picture.texous.cn/blog/20250516172708794.png)
### 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
@ -62,4 +64,5 @@
- 第三步需要开发介入
### Amazon
- 需要重新注册账号
- ![](https://picture.texous.cn/blog/20250516165509840.png)

View File

@ -24,8 +24,7 @@
# engine-starter-redis 使用教程
> 基于 Redis 的各种工具封装
> 具体使用可参考 [engine-sample > engine-sample-starter-redis](../engine-sample/engine-sample-starter-redis)
> 版本要求:`$verison >= 1.0.14-SNAPSHOT`
> 具体使用可参考 [engine-sample > engine-sample-starter-redis](../engine-sample/engine-sample-starter-redis)
## 功能特性
@ -50,7 +49,7 @@
### 添加依赖
**注意:** `qifu-saas-parent` 版本需要高于 `1.0.14-SNAPSHOT`
**注意:** `qifu-saas-parent >= 1.0.14-SNAPSHOT`
```xml
@ -60,11 +59,13 @@
</dependency>
```
### 使用工具
-----------
## 使用工具
除了 spring-cache 和 RedisMessageListener 默认关闭之外,别的功能都是默认开启的,开箱即用
#### 幂等工具使用
### 幂等工具使用
```java
public class Usage {
@ -79,7 +80,7 @@ public class Usage {
}
```
#### 限流工具使用
### 限流工具使用
```java
public class Usage {
@ -91,7 +92,7 @@ public class Usage {
}
```
#### 分布式锁工具使用
### 分布式锁工具使用
```java
public class Usage {
@ -143,9 +144,9 @@ public class Usage {
}
```
#### 缓存工具使用
### 缓存工具使用
##### 开启Redis缓存
#### 开启Redis缓存
```yaml
yuanmeng:
@ -154,7 +155,7 @@ yuanmeng:
enable: true
```
##### 使用缓存工具
#### 使用缓存工具
```java
public class Usage {
@ -167,9 +168,9 @@ public class Usage {
}
```
#### RedisMessageListener工具使用
### RedisMessageListener工具使用
##### 开启Redis消息
#### 开启Redis消息
```yaml
yuanmeng:
@ -178,7 +179,7 @@ yuanmeng:
enable: true
```
##### 使用消息工具
#### 使用消息工具
```java

View File

@ -24,8 +24,7 @@
# engine-starter-feign 使用教程
> 基于 Feign 的通用封装
> 具体使用可参考 [engine-sample > engine-sample-starter-web](../engine-sample/engine-sample-starter-web)
> 版本要求:`$verison >= 1.1.0-SNAPSHOT`
> 具体使用可参考 [engine-sample > engine-sample-starter-web](../engine-sample/engine-sample-starter-web)
## 功能特性
@ -37,7 +36,7 @@
## 快速使用
- **注意:** `qifu-saas-parent` 版本需要高于 `1.1.0-SNAPSHOT`
- **注意:** `qifu-saas-parent >= 1.1.0-SNAPSHOT`
- **注意:** 启动类 `@ComponentScan` 需要变更为如下形式
- ```java
@ComponentScan(value = "com.yuanmeng.*",

View File

@ -25,7 +25,6 @@
> 基于 web 的各种工具封装
> 具体使用可参考 [engine-sample > engine-sample-starter-web](../engine-sample/engine-sample-starter-web)
> 版本要求:`$verison >= 1.1.0-SNAPSHOT`
> 去除 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` 之前
- **注意:** 启动类 `@ComponentScan` 需要变更为如下形式
- ```java
@ -66,7 +65,7 @@
}
```
- **注意:** 引入 `engine-starter-web` 后可以移除 `web-core``oauth2-core` 依赖。但是 `SecurityUtils` 需要改为
- **(可选操作)** 引入 `engine-starter-web` 后可以移除 `web-core``oauth2-core` 依赖。但是 `SecurityUtils` 需要改为
`YmSecurityUtils`
### 添加依赖
@ -79,7 +78,7 @@
</dependency>
```
---
----
## 使用工具
@ -109,21 +108,25 @@ public class Usage {
@GetMapping("/exception")
public String exception() {
// 打印error日志触发告警
throw new RuntimeException("exception");
}
@GetMapping("/ym-exception")
public String ymException() {
// 打印error日志触发告警
throw new YmException("ym exception");
}
@GetMapping("/ym-biz-exception")
public String ymBizException() {
// 打印 warning 日志
throw new YmBizException(YmResultCode.BASE_ERROR);
}
@GetMapping("/ym-biz-data-exception")
public String ymBizDataException() {
// 打印 info 日志
throw new YmBizDataException(YmResultCode.BASE_ERROR,
new TestData(TestStatusEnum.SUCCESS.getCode(), "1"));
}
@ -131,6 +134,7 @@ public class Usage {
@YmAutofillResp
@GetMapping("/ym-biz-data-exception-fill")
public String ymBizDataExceptionFill() {
// 触发结果数据自动填充
throw new YmBizDataException(YmResultCode.BASE_ERROR,
new TestData(TestStatusEnum.SUCCESS.getCode(), "1"));
}
@ -150,7 +154,7 @@ yuanmeng:
```
- 添加国际化文件
- 默认 `resources > i18n > messages_zh_CN.properties`
- 默认 `resources > i18n > messages_zh_CN.properties`
```properties
Base\ Error=服务端错误
@ -173,6 +177,7 @@ public String i18nIgnore() {
@GetMapping("/i18n-error")
public String i18nError() {
// 触发国际化配置
throw new YmBizException(YmResultCode.BASE_ERROR);
}
```

View File

@ -76,4 +76,15 @@
- 也可以直接命令行(阿里云镜像): `--index sparse+https://mirrors.aliyun.com/crates.io-index/`
- ```shell
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
```