|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package org.jeecg.config; |
|
|
|
|
|
|
|
|
|
import io.swagger.v3.oas.annotations.Operation; |
|
|
|
|
import io.swagger.v3.oas.models.Components; |
|
|
|
|
import io.swagger.v3.oas.models.OpenAPI; |
|
|
|
|
import io.swagger.v3.oas.models.Paths; |
|
|
|
@ -38,6 +39,10 @@ public class Swagger3Config implements WebMvcConfigurer {
|
|
|
|
|
return GroupedOpenApi.builder() |
|
|
|
|
.group("default") |
|
|
|
|
.packagesToScan("org.jeecg") |
|
|
|
|
// 剔除以下几个包路径的接口生成文档
|
|
|
|
|
.packagesToExclude("org.jeecg.modules.drag", "org.jeecg.modules.online", "org.jeecg.modules.jmreport") |
|
|
|
|
// 加了Operation注解的方法,才生成接口文档
|
|
|
|
|
.addOpenApiMethodFilter(method -> method.isAnnotationPresent(Operation.class)) |
|
|
|
|
.build(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|