This commit is contained in:
CC
2025-10-28 00:33:26 +08:00
parent 1c9c9cfa06
commit a82ff0d39f
3 changed files with 32 additions and 22 deletions
+14 -4
View File
@@ -9,11 +9,15 @@
### 方式一:手动调用API接口(推荐)
发送POST请求到:`http://your-server:port/jd/cleanRedisData`
⚠️ **注意端口号**:
- **jd项目端口**:6666(直接访问,无需认证)
- RuoYi框架端口:30313(需要认证,不推荐)
发送POST请求到:`http://your-server:6666/jd/cleanRedisData`
**请求示例:**
```bash
curl -X POST http://localhost:8080/jd/cleanRedisData \
curl -X POST http://192.168.8.88:6666/jd/cleanRedisData \
-H "Content-Type: application/json" \
-d '{
"skey": "2192057370ef8140c201079969c956a3"
@@ -31,15 +35,21 @@ curl -X POST http://localhost:8080/jd/cleanRedisData \
### 方式二:使用Postman等工具
1. 创建新的POST请求
2. URL: `http://localhost:8080/jd/cleanRedisData`
2. URL: `http://192.168.8.88:6666/jd/cleanRedisData`(注意是6666端口)
3. Headers: `Content-Type: application/json`
4. Body (raw JSON):
4. Body 标签选择 **raw** 格式,类型选择 **JSON**
5. Body 内容:
```json
{
"skey": "2192057370ef8140c201079969c956a3"
}
```
⚠️ **常见错误**:
- ❌ 不要把skey放在Query参数中
- ❌ 不要使用30313端口(会遇到401认证错误)
- ✅ 确保在Body标签中使用JSON格式
### 方式三:自动定时执行
系统已配置定时任务,每天凌晨3点自动执行清理: