From d0545d80ffeeefde145d346585abc86667e95b22 Mon Sep 17 00:00:00 2001 From: liuxiaohua Date: Fri, 23 May 2025 15:49:26 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20[2025-05-23]=20=E6=A2=B3=E7=90=86?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 发版/2025/20250513-电商应用发布材料.md | 5 +++- .../20250411-EngineStarterRedis使用指南.md | 27 ++++++++++--------- .../20250509-EngineStarterFeign使用指南.md | 5 ++-- .../20250509-EngineStarterWeb使用指南.md | 15 +++++++---- 材料/00-基础镜像地址.md | 13 ++++++++- 5 files changed, 42 insertions(+), 23 deletions(-) diff --git a/发版/2025/20250513-电商应用发布材料.md b/发版/2025/20250513-电商应用发布材料.md index 463b7e6..4eee7cc 100644 --- a/发版/2025/20250513-电商应用发布材料.md +++ b/发版/2025/20250513-电商应用发布材料.md @@ -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) diff --git a/文档/基础组件/20250411-EngineStarterRedis使用指南.md b/文档/基础组件/20250411-EngineStarterRedis使用指南.md index a1331d8..d1ccec6 100644 --- a/文档/基础组件/20250411-EngineStarterRedis使用指南.md +++ b/文档/基础组件/20250411-EngineStarterRedis使用指南.md @@ -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 @@ ``` -### 使用工具 +----------- + +## 使用工具 除了 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 diff --git a/文档/基础组件/20250509-EngineStarterFeign使用指南.md b/文档/基础组件/20250509-EngineStarterFeign使用指南.md index 0d32b4b..eb32632 100644 --- a/文档/基础组件/20250509-EngineStarterFeign使用指南.md +++ b/文档/基础组件/20250509-EngineStarterFeign使用指南.md @@ -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.*", diff --git a/文档/基础组件/20250509-EngineStarterWeb使用指南.md b/文档/基础组件/20250509-EngineStarterWeb使用指南.md index bd251af..96f7c50 100644 --- a/文档/基础组件/20250509-EngineStarterWeb使用指南.md +++ b/文档/基础组件/20250509-EngineStarterWeb使用指南.md @@ -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 @@ ``` ---- +---- ## 使用工具 @@ -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); } ``` diff --git a/材料/00-基础镜像地址.md b/材料/00-基础镜像地址.md index d3d97d9..1a946a8 100644 --- a/材料/00-基础镜像地址.md +++ b/材料/00-基础镜像地址.md @@ -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 - ``` \ No newline at end of file + ``` + +## 修改 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 +``` \ No newline at end of file