Java JDK 17+
java -versionNode.js 16+
node --versionMySQL 8.0
mysql --versionmes_sorterrootMinato@114514WorkBench_Remake/
├── Back/
│ └── mes-sorter/ # Spring Boot后端
├── Front/
│ └── mes-frontend/ # Vue.js前端
└── start.bat # 一键启动脚本
start.bat
cd Back\mes-sorter
mvn spring-boot:run
cd Front\mes-frontend
npm install # 首次运行
npm run dev
检查Java和Maven环境,确保依赖完整
检查配置: Back\mes-sorter\src\main\resources\application.properties
spring.datasource.url=jdbc:mysql://localhost:3306/mes_sorter
spring.datasource.username=root
spring.datasource.password=Minato@114514
application.properties 中的 server.portvite.config.js 中的 server.port检查 Front\mes-frontend\vite.config.js:
proxy: {
'/ep': {
target: 'http://localhost:8088',
changeOrigin: true
}
}
确保存在以下文件:
Back\mes-sorter\src\main\resources\mapper\PieceMapper.xmlBack\mes-sorter\src\main\resources\mapper\DispatchMapper.xmlcd Back\mes-sorter
mvn clean install
cd Front\mes-frontend
npm install --force
curl http://localhost:8088/ep/mes/dashboard/stats
curl http://localhost:8088/ep/mes/workstations/list
curl http://localhost:8088/ep/mes/plan/items?pplansheet=20250618
logs/ 目录-- 查看数据库状态
USE mes_sorter;
SHOW TABLES;
-- 检查关键表
SELECT COUNT(*) FROM piece;
SELECT COUNT(*) FROM workstation;
SELECT COUNT(*) FROM dispatch;
A: 检查浏览器控制台错误,通常是API调用失败
A: 检查数据库连接,确保MySQL服务运行
A: 检查后端控制台日志,通常是数据库操作错误
A: 前端已配置代理,确保代理目标端口正确
启动成功后,验证以下功能:
如果遇到问题,请提供: