feat: 统一JWT密钥配置并修复签名验证问题
修复前端签名生成中bodyString硬编码问题 添加start-frontend.sh脚本启动前端服务 统一manage-app和gateway的JWT密钥配置 修复Repository扫描路径问题 更新测试配置和依赖 重构表名映射为sys_user和sys_role 完善用户实体类字段映射 添加集成测试配置和测试用例
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
直接测试网关
|
||||
"""
|
||||
|
||||
import requests
|
||||
import time
|
||||
|
||||
# 先登录获取Token
|
||||
login_data = {
|
||||
"username": "admin",
|
||||
"password": "admin123"
|
||||
}
|
||||
|
||||
print("1. 登录...")
|
||||
response = requests.post("http://localhost:8080/api/auth/login", json=login_data)
|
||||
print(f"状态码: {response.status_code}")
|
||||
print(f"响应: {response.text[:200]}...")
|
||||
|
||||
if response.status_code == 200:
|
||||
token = response.json().get('token')
|
||||
print(f"\nToken: {token[:50]}...")
|
||||
|
||||
# 测试用户管理API
|
||||
print("\n2. 测试用户管理API...")
|
||||
headers = {
|
||||
"Authorization": f"Bearer {token}"
|
||||
}
|
||||
|
||||
response2 = requests.get("http://localhost:8080/api/users/page?page=0&size=10", headers=headers)
|
||||
print(f"状态码: {response2.status_code}")
|
||||
print(f"响应: {response2.text[:200]}...")
|
||||
|
||||
# 测试用户统计API
|
||||
print("\n3. 测试用户统计API...")
|
||||
response3 = requests.get("http://localhost:8080/api/users/count", headers=headers)
|
||||
print(f"状态码: {response3.status_code}")
|
||||
print(f"响应: {response3.text[:200]}...")
|
||||
Reference in New Issue
Block a user