AutoMedinfo/手动启动指南.txt

91 lines
2.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

====================================
手动启动前后端服务指南
====================================
由于自动脚本可能遇到路径问题,请按以下步骤手动启动:
====================================
步骤1: 启动后端服务
====================================
1. 打开第一个命令行窗口
2. 执行以下命令:
cd d:\SoftwarePrj\文献流程\backend
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_161
set PATH=%JAVA_HOME%\bin;%PATH%
mvn spring-boot:run
3. 等待后端启动完成约1-2分钟
看到 "Started MedicalInfoApplication" 表示启动成功
====================================
步骤2: 启动前端服务
====================================
1. 打开第二个命令行窗口
2. 执行以下命令:
cd d:\SoftwarePrj\文献流程\frontend
npm install
npm run dev
3. 等待前端启动完成
看到 "Local: http://localhost:3000" 表示启动成功
====================================
步骤3: 访问系统
====================================
1. 打开浏览器
2. 访问: http://localhost:3000
3. 使用默认账号登录:
- 用户名: admin
- 密码: admin123
====================================
验证服务状态
====================================
后端健康检查:
- 访问: http://localhost:8080/api/inquiries
- 应该返回JSON数据即使是空数组
前端页面:
- 访问: http://localhost:3000
- 应该看到登录页面
====================================
常见问题
====================================
Q1: 后端启动失败提示找不到Spring Boot插件
A1: 确保在backend目录中执行命令不是项目根目录
Q2: 前端npm install失败
A2: 检查Node.js版本是否为18+,或尝试:
npm cache clean --force
npm install
Q3: 端口被占用
A3: 检查端口占用:
netstat -ano | findstr :8080
netstat -ano | findstr :3000
Q4: 后端连接数据库失败
A4: 确保MySQL已启动或先使用Docker方式启动
====================================
Docker方式备选
====================================
如果手动启动遇到问题可以使用Docker方式
1. 确保Docker Desktop已安装并运行
2. 双击 start.bat
3. 等待服务启动
4. 访问: http://localhost
====================================