Swagger2

Swagger2

引入依赖

    <!-- springfox-swagger2 -->
    <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger2</artifactId>
        <version>2.10.5</version>
    </dependency>

编写配置

@Configuration
public class Swagger2BizConfigure {
   
   

    @Resource
    private OpenApiExtensionResolver openApiExtensionResolver;

    /**
     * API文档分组配置
     **/
    @Bean(value = "bizDocApi")
    public Docket bizDocApi() {
   
   
        return new Docket(DocumentationType.SWAGGER_2)
                .apiInfo(new ApiInfoBuilder()
                        .title("业务功能BIZ")   // 切换的当前包下的模块名称
                        .description("业务功能BIZ")
                        .termsOfServiceUrl("https://xx.xxx.xx/")
                        .contact(new Contact("xxx","https://xx.xxx.xx/", "xxx@qq.com"))                        .version("2.0.0")
                        .build())
                .globalResponseMessage(RequestMethod.GET, CommonResult.responseList())
                .globalResponseMessage(RequestMethod.POST

相关推荐

  1. Swagger2

    2024-02-13 00:00:03       35 阅读
  2. Swagger2

    2024-02-13 00:00:03       44 阅读
  3. springboot引入swagger2

    2024-02-13 00:00:03       32 阅读
  4. Swagger2以及Spring Boot整合Swagger2教程

    2024-02-13 00:00:03       42 阅读
  5. <span style='color:red;'>Swagger</span>

    Swagger

    2024-02-13 00:00:03      18 阅读
  6. springboot 2.7.0 集成 swagger

    2024-02-13 00:00:03       39 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-02-13 00:00:03       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-02-13 00:00:03       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-02-13 00:00:03       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-02-13 00:00:03       20 阅读

热门阅读

  1. Spring Boot + Lua = 王炸!

    2024-02-13 00:00:03       29 阅读
  2. 【嵌入式开发】70

    2024-02-13 00:00:03       27 阅读
  3. STM32 7-8

    STM32 7-8

    2024-02-13 00:00:03      27 阅读
  4. C++ 同构数,的问题。

    2024-02-13 00:00:03       30 阅读
  5. H5/CSS 笔试面试考题(41-50)

    2024-02-13 00:00:03       25 阅读
  6. H5/CSS 笔试面试考题(51-60)

    2024-02-13 00:00:03       27 阅读
  7. ZooKeeper分布式锁

    2024-02-13 00:00:03       29 阅读
  8. C语言:表达式求值

    2024-02-13 00:00:03       34 阅读
  9. 【嵌入式开发】72

    2024-02-13 00:00:03       27 阅读
  10. Pandas to_csv() - 将 DataFrame 转换为 CSV

    2024-02-13 00:00:03       27 阅读
  11. leetcode81 搜索旋转排序数组 II

    2024-02-13 00:00:03       40 阅读
  12. 数据结构基础

    2024-02-13 00:00:03       28 阅读
  13. jQuery---判断元素是否是显示状态

    2024-02-13 00:00:03       34 阅读