This commit is contained in:
2025-10-28 00:33:26 +08:00
parent 1c9c9cfa06
commit a82ff0d39f
3 changed files with 32 additions and 22 deletions

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点自动执行清理