You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ECMS/DeploymentGuide

52 lines
1.4 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

部署说明Windows 环境)
1. 环境准备
- 操作系统Windows 10/11
- JDK8+(建议 11
- Node.js16+(与项目 `package.json` 兼容)
- Redis用于验证码缓存
2. 后端Spring Boot
2.1 进入目录
`backend/backend/prj-backendSpring Boot版`
2.2 配置
- 编辑 `src/main/resources/application.yml`
- 数据库连接url、username、password
- Redis 连接
2.3 编译与运行
- 使用IDEIntelliJ IDEA/Eclipse导入Maven项目并运行 `SpringBootApplication`
- 或命令行PowerShell
- `mvn -v`确认Maven可用
- `mvn clean package -DskipTests`
- 运行:`java -jar target/*.jar`
3. 前端Vue
3.1 进入目录
`frontend`
3.2 安装依赖(首次)
`npm install`
3.3 配置
- 在根目录或 `.env.*` 中设置 `VUE_APP_BASE_API` 指向后端地址(如 `http://localhost:8080`)。
3.4 启动
`npm run serve`
4. 访问
- 前端开发地址:`http://localhost:8080`(或控制台实际端口)
- 登录页:`/login`;首页:`/index`
5. 常见问题
- 401确认登录成功并在请求头携带 `Authorization: Bearer <token>`
- 验证码过期:重新获取 `/captchaImage`
- 超时:前端默认 2000ms可在 `src/utils/request.js` 调整。
6. 目录规范
- 主分支:`main`;结构包含 `doc/` 与 `src/`
- 前后端独立启动;