自定义配置(简介明了)"/>
OpenAPI3Spring Boot 自定义配置(简介明了)
OpenAPI3&Spring Boot 自定义配置
- DocProperties
- DocConfiguration
- pom.xml
- application.yaml
DocProperties
@Data
@ConfigurationProperties("doc.info")
public class DocProperties {/*** 分组名称*/private String group = "default";/*** 标题*/private String title = "API";/*** 描述*/private String description = "RESTFUL API";/*** 版*/private String version = "v2.0.0";/*** 接口调用地址*/private String serverUrl;/*** 执照*/private String license = "Apache 2.0";/*** 执照地址*/private String licenseUrl = ".0.html";/*** 全局安全配置*/private List<SecurityScheme> securitySchemes = Lists.newArrayList();}
DocConfiguration
- Doc 基础信息配置
- 认证配置
- 全局变量配置
@Slf4j
@AllArgsConstructor
@EnableConfigurationProperties(DocProperties.class)
public class DocConfiguration {private final DocProperties docProperties;/*** Api docket.*
更多推荐
OpenAPI3Spring Boot 自定义配置(简介明了)
发布评论