ether-docs/02-DESIGN/standards/DEVELOPMENT_CHECKLIST.md

37 lines
1.2 KiB
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.

# 开发自检清单
> 每次开发新功能前,请先过一遍这份清单
## 一、代码修改前
- [ ] 确认修改范围,不扩大
- [ ] 确认测试账号密码格式BCrypt
- [ ] 确认是否需要同步文档
## 二、后端修改
- [ ] 子模块修改后执行 `mvn install -pl {module} -am -DskipTests`
- [ ] 修改 Spring Security 配置后检查自动配置排除
- [ ] 上线前移除所有 `log.info` 调试日志
## 三、前端修改
- [ ] 热更新不生效时重启前端服务
- [ ] 路由守卫问题检查 `localStorage` 而非 store 状态
- [ ] 上线前移除所有 `console.log`
## 四、测试验证
- [ ] 后端启动命令 `cd ether-pms/pms-starter && mvn spring-boot:run`
- [ ] 前端启动命令 `cd ether-admin && npm run dev`
- [ ] 登录测试 `curl -X POST http://localhost:8080/api/auth/login -H "Content-Type: application/json" -d '{"username":"admin","password":"Admin@123"}'`
## 五、常见问题快速排查
| 现象 | 检查点 |
|------|--------|
| 登录 403 错误 | 检查 CSRF 配置 |
| 子模块配置不生效 | 检查是否执行了 mvn install |
| 前端不跳转 | 检查 isLoggedIn() 是否读取 localStorage |
| 热更新不生效 | 重启前端服务 |