Files
MTKJPAY/PORT_CONFIG.md
qiube 3133369053 docs(readme): 添加项目启动和编译问题解决方案文档
- 新增 FIX_COMPILE.md 文件,提供修复IDE编译问题的四种方法
- 新增 HOW_TO_START.md 文件,详细说明如何正确启动后端服务
- 强调必须启动 mt-pay 模块的 MtPayApplication 类
- 提供 IntelliJ IDEA 和 Maven 两种启动方式
- 列出常见启动错误及解决方案
- 添加快速检查清单帮助验证启动状态
2025-12-19 18:34:00 +08:00

47 lines
1017 B
Markdown
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.
# 端口配置说明
## 端口分配
- **前端Vite开发服务器**: `3000`
- **后端Spring Boot应用**: `8082`
## 访问地址
- **前端访问地址**: `http://localhost:3000`
- **后端API地址**: `http://localhost:8082`
- **Druid监控**: `http://localhost:8082/druid`
## 代理配置
前端通过 Vite 代理将 `/api/*` 请求转发到后端:
```javascript
// vite.config.js
proxy: {
'/api': {
target: 'http://127.0.0.1:8082',
changeOrigin: true
}
}
```
## 启动顺序
1. **启动后端**:运行 `MtPayApplication`,监听 `8082` 端口
2. **启动前端**:运行 `npm run dev`,监听 `3000` 端口
## 配置文件位置
### 前端
- `MTKJPAY-FRONT/vite.config.js` - Vite配置端口 3000
### 后端
- `MTKJPAY/mt-pay/src/main/resources/application.yml` - 主配置,端口 8082
## 注意事项
1. 确保两个端口都没有被其他程序占用
2. 前端启动后会自动通过代理访问后端
3. 如果修改端口,需要同步更新相关配置