Skip to content

Commit

Permalink
update > document
Browse files Browse the repository at this point in the history
  • Loading branch information
lihengming committed Jul 7, 2017
1 parent db29f6c commit 905234a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
## 简介
Spring Boot API Project Seed 是一个基于Spring Boot & MyBatis的种子项目,用于快速构建中小型API、RESTful API项目,该种子项目已经有过多个真实项目的实践,稳定、简单、快速,使我们摆脱那些重复劳动,专注于业务代码的编写,减少加班。下面是一个简单的使用演示,看如何基于本项目在短短几十秒钟内实现一套简单的API,并运行提供服务。

[![请选择超清](https://raw.githubusercontent.com/lihengming/shared-files/master/project-example-youku.png)](http://v.youku.com/v_show/id_XMjg1NjYwNDgxNg==.html?spm=a2h3j.8428770.3416059.1)
[![请选择超清](https://raw.githubusercontent.com/lihengming/java-codes/master/shared-resources/github-images/project-example-youku.png)](http://v.youku.com/v_show/id_XMjg1NjYwNDgxNg==.html?spm=a2h3j.8428770.3416059.1)
## 特征&提供
- 最佳实践的项目结构、配置文件、精简的POM([查看项目结构图](https://github.com/lihengming/shared-files/blob/master/project-struct.png)
- 最佳实践的项目结构、配置文件、精简的POM([查看项目结构图](https://github.com/lihengming/java-codes/blob/master/shared-resources/github-images/project-struct.png)
- 统一响应结果封装及生成工具
- 统一异常处理
- 简单的接口签名认证
Expand All @@ -29,7 +29,7 @@ Spring Boot API Project Seed 是一个基于Spring Boot & MyBatis的种子项目
- Model内成员变量建议与表字段数量对应,如需扩展成员变量(比如连表查询)建议创建DTO,否则需在扩展的成员变量上加```@Transient```注解,详情见[通用Mapper插件文档说明](https://mapperhelper.github.io/docs/2.use/)
- 建议业务失败直接使用```ServiceException("message")```抛出,由统一异常处理器来封装业务失败的响应结果,比如```throw new ServiceException("该手机号已被注册")```,会直接被封装为```{"code":400,"message":"该手机号已被注册"}```返回,无需自己处理,尽情抛出
- 需要工具类的话建议先从```apache-commons-*``````guava```中找,实在没有再造轮子或引入类库,尽量精简项目
- 开发规范建议遵循阿里巴巴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))
- 开发规范建议遵循阿里巴巴Java开发手册([最新版下载](https://github.com/lihengming/java-codes/blob/master/shared-resources/%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))
- 建议在公司内部使用[ShowDoc](https://github.com/star7th/showdoc)[SpringFox-Swagger2](https://github.com/springfox/springfox)[RAP](https://github.com/thx/RAP)等开源项目来编写、管理API文档

## 技术选型&文档
Expand Down

0 comments on commit 905234a

Please sign in to comment.