feat: Spring Boot 3.5.14 全量升级 + 组件升级
核心升级: - Spring Boot 2.7.18 → 3.5.14 - MyBatis Plus 3.5.5 → 3.5.16 (spring-boot3-starter) - Springdoc 1.8.0 → 2.8.6 (OpenAPI 3) - Flowable 6.8.0 → 7.1.0 - Druid 1.2.x → 1.2.28 (boot3-starter) - kotlin-reflect 1.9.10 → 1.9.25 迁移适配: - javax → jakarta 命名空间 (620+ 文件) - Swagger 注解迁移到 OpenAPI 3 (@Tag/@Schema/@Operation/@Parameter) - Spring Security 6.2 适配 (antMatchers→requestMatchers, EnableMethodSecurity) - Druid 包名迁移 (boot→boot3) - Redis 配置路径迁移 (spring.redis→spring.data.redis) - Flyway 适配 (flyway-database-postgresql) - Flowable 7.x 适配 (MULE_TASK_IMAGE 移除) 修复: - spring-boot-maven-plugin 2.5.15→3.5.14 (SPI服务发现失效) - mybatis-plus-boot-starter 3.5.5→3.5.16 (kotlin-reflect+fastjson2冲突) - Flowable database-schema-update 启用自动建表 验证: 23/23 测试通过, 1374 API端点正常
This commit is contained in:
55
openhis-ui-vue3/tests/e2e/specs/debug-login.spec.ts
Normal file
55
openhis-ui-vue3/tests/e2e/specs/debug-login.spec.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
test('debug login', async ({ page }) => {
|
||||
// 1. 先访问页面获取 cookie
|
||||
await page.goto('http://localhost:81/');
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// 2. 调用登录 API
|
||||
const loginResp = await page.request.post('http://localhost:18082/openhis/login', {
|
||||
data: {
|
||||
username: 'doctor1',
|
||||
password: '123456',
|
||||
tenantId: '1',
|
||||
code: '',
|
||||
uuid: ''
|
||||
}
|
||||
});
|
||||
const loginData = await loginResp.json();
|
||||
console.log('Login response:', JSON.stringify(loginData));
|
||||
|
||||
// 3. 设置 token
|
||||
const token = loginData.token;
|
||||
await page.evaluate((t) => {
|
||||
localStorage.setItem('Admin-Token', t);
|
||||
}, token);
|
||||
|
||||
// 4. 检查 token 是否设置成功
|
||||
const savedToken = await page.evaluate(() => localStorage.getItem('Admin-Token'));
|
||||
console.log('Saved token:', savedToken ? savedToken.substring(0, 20) + '...' : 'null');
|
||||
|
||||
// 5. 导航到门诊医生站
|
||||
await page.goto('http://localhost:81/clinicManagement/doctorStation');
|
||||
await page.waitForLoadState('networkidle');
|
||||
await page.waitForTimeout(5000);
|
||||
|
||||
// 6. 检查页面内容
|
||||
const title = await page.title();
|
||||
console.log('Page title:', title);
|
||||
console.log('Page URL:', page.url());
|
||||
|
||||
// 7. 获取页面 HTML 结构
|
||||
const bodyHTML = await page.evaluate(() => document.body.innerHTML.substring(0, 2000));
|
||||
console.log('Body HTML (first 2000 chars):', bodyHTML);
|
||||
|
||||
// 8. 检查是否有错误
|
||||
const errors = await page.evaluate(() => {
|
||||
const errorElements = document.querySelectorAll('.el-message--error, .error, [class*="error"]');
|
||||
return Array.from(errorElements).map(e => e.textContent?.trim()).filter(Boolean);
|
||||
});
|
||||
console.log('Errors found:', errors);
|
||||
|
||||
// 截图
|
||||
await page.screenshot({ path: '/tmp/debug-login.png' });
|
||||
console.log('Screenshot saved to /tmp/debug-login.png');
|
||||
});
|
||||
Reference in New Issue
Block a user