文档地址
添加插件
<plugin><groupId>com.ly.smart-doc</groupId><artifactId>smart-doc-maven-plugin</artifactId><version>3.0.9</version><configuration><includes><!--格式为:groupId:artifactId;参考如下--><!--也可以支持正则式如:com.alibaba:.* --><include>com.power.doc:.*</include><!-- <include>com.baomidou:mybatis-plus-extension</include>--><include>com.ly.smart-doc:.*</include><!-- <include>org.springframework:spring-web</include>--></includes><!--指定生成文档的使用的配置文件--><configFile>./src/main/resources/smart-doc.json</configFile><excludes><!--不加载alibaba的相关依赖,提升速度--><exclude>com.ruoyi.quartz:.*</exclude></excludes><!--指定项目名称--><projectName>测试</projectName></configuration><executions><execution><goals><goal>html</goal></goals></execution></executions></plugin>
在对应maven 插件下可以看到
添加json 配置文件 resource
下 smart-doc.json
{"serverUrl": "http://localhost:8181","outPath": "src/main/resources/static/doc","isStrict": false,"#####": "allInOne:true 此参数表示记录文档变更的记录","createDebugPage": false,"packageFilters": "com.it.zqm.controller.*","style":"xt256","showAuthor":true,"inlineEnum": true,"revisionLogs": [{"version": "文档版本号","version": "1.0","_revisionTime": "文档修订时间","revisionTime": "2024-12-31 10:30","_status": "update,create可选","status": "update","author": "author","_remarks": "变更描述","remarks": "desc"}],"errorCodeDictionaries": [{ //错误码列表,没有需求可以不设置"title": "title","enumClassName": "com.it.zqm.enums.ResultCodeEnum", //错误码枚举类"codeField": "code",//错误码的code码字段名称"descField": "message"//错误码的描述信息对应的字段名}]
}
不用 的注释需要删除掉