OpenAPI3Spring Boot 自定义配置(简介明了)

编程入门 行业动态 更新时间:2024-10-24 04:46:16

OpenAPI3Spring Boot <a href=https://www.elefans.com/category/jswz/34/1771438.html style=自定义配置(简介明了)"/>

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 自定义配置(简介明了)

本文发布于:2024-02-26 08:03:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1701805.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:自定义   简介   OpenAPI3Spring   Boot

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!