在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:spring-adorner开源软件地址:https://gitee.com/jaemon/spring-adorner开源软件介绍:spring mvc api接口文档生成利器为什么选择Spring Adorner? 开源社区已有swagger-api、JApiDocs等一系列非常优秀的api文档生成器开源项目,但是却也有其不足之处。
Spring Adorner项目设立初衷是打造为一款纯API接口文档生成的轻量级工具
☑ Quickly Start引入Adorner依赖包<dependency> <groupId>io.gitee.jaemon</groupId> <artifactId>spring-adorner</artifactId> <version>${adorner.version}</version></dependency>
使用Adorner生成API接口文档不解析注释public class AdornerApplication { public static void main(String[] args) { // 指定API文档生成路径(包括文件名) String filePath = "/home/jaemon/api/api.md"; // 待扫描的API接口包路径(注意修改为实际项目中的包路径) String packageName = "io.gitee.jaemon.spring.adorner.contorller"; SpringAdornerStarter.generate(filePath, packageName); }} 解析注释public class AdornerApplication { public static void main(String[] args) { // 指定API文档生成路径(包括文件名) String filePath = "/home/jaemon/api/api.md"; // 待扫描的API接口包路径(注意修改为实际项目中的包路径) String packageName = "io.gitee.jaemon.spring.adorner.contorller"; // 注释扫描器 DocScanner docScanner = DocScanner.of( // 需要解析注释的包路径 Lists.newArrayList("io.gitee.jaemon.spring.adorner.contorller", "io.gitee.jaemon.spring.adorner.entity") ); // 定义Adorner上下文配置对象 AdornerApplicationContext context = AdornerApplicationContext.builder() .docScanner(docScanner) .build(filePath, new String[]{packageName}); SpringAdornerStarter.generate(context); }}
✉ Documentation, Getting Started and Developer Guides
✎ Upgrade Log
✍ Feedback
|
2022-08-15
2022-08-17
2022-09-23
2023-10-27
2022-08-18
请发表评论