Skip to content

Commit 706514b

Browse files
committed
update > the document
1 parent 39cac03 commit 706514b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ Spring Boot API Project Seed 是一个基于Spring Boot & MyBatis的种子项目
2525
5. 对开发环境配置文件```application-dev.properties```进行配置,启动项目,Have Fun!
2626

2727
## 开发建议
28-
- 表名,应使用小写,多个单词使用下划线拼接
28+
- 表名,建议使用小写,多个单词使用下划线拼接
2929
- Model内成员变量建议与表字段数量对应,如需扩展成员变量(比如连表查询)建议创建DTO,否则需在扩展的成员变量上加```@Transient```注解,详情见[通用Mapper插件文档说明](https://mapperhelper.github.io/docs/2.use/)
30-
- 建议业务失败使用```ServiceException("message")```抛出,由统一异常处理器来封装JSON结果,比如```throw new ServiceException("该手机号已存在")```,会直接被封装为```{"code":400,"message":"该手机号已存在"}```返回,无需自己处理,尽情抛出
30+
- 建议业务失败使用```ServiceException("message")```抛出,由统一异常处理器来封装JSON结果,比如```throw new ServiceException("该手机号已被注册")```,会直接被封装为```{"code":400,"message":"该手机号已被注册"}```返回,无需自己处理,尽情抛出
3131
- 需要工具类的话建议先从```apache-commons-*``````guava```中找,实在没有再造轮子或引入类库,尽量精简项目
3232
- 开发规范建议遵循阿里巴巴Java开发手册([最新版下载](https://github.com/lihengming/shared-files/blob/master/%E9%98%BF%E9%87%8C%E5%B7%B4%E5%B7%B4Java%E5%BC%80%E5%8F%91%E6%89%8B%E5%86%8Cv1.2.0.pdf))
33+
- 建议在公司内部使用[ShowDoc](https://github.com/star7th/showdoc)[SpringFox-Swagger2](https://github.com/springfox/springfox)[RAP](https://github.com/thx/RAP)等开源项目来编写、管理API文档
3334

3435
## 技术选型&文档
3536
- Spring Boot([查看Spring Boot学习&使用指南](http://www.jianshu.com/p/1a9fd8936bd8)

0 commit comments

Comments
 (0)