spring-boot 一款无侵入型,轻量级的接口文档生成工具apiggs
名字叫:apiggs
使用只需两步,先把插件代码引入pom文件,然后编译打包即可
之后项目的target目录下,就会多出一个apiggs的文件夹,里面便是项目controller的文档
github上有源码:https://github.com/apigcc/apigcc-maven-plugin
<build><finalName>XXX</finalName><plugins><plugin><groupId>com.github.apiggs</groupId><artifactId>apiggs-maven-plugin</artifactId><version>1.6</version><executions><execution><phase>compile</phase><goals><goal>apiggs</goal></goals></execution></executions><configuration><!-- options in there --></configuration></plugin></plugins></build>
其他
1、一般生成文档的,还有Swagger
优点是功能比较全面,支持模拟调用等
缺点是代码侵入太强,需要使用swagger自己的注解
2、如果觉得swagger难看,还有swagger-bootstrap-ui
Swagger-Bootstrap-UI 基于Swagger 的前端UI ,采用jQuery+bootstrap实现。
Swagger的默认UI是上下结构的,用起来不太习惯,
Swagger-Bootstrap-UI实现左右菜单风格的Swagger-UI,看起来更清晰。