swagger
呐呐呐-
喜欢编程世界的小白
展开
-
Swagger 修改默认配置
目录swagger配置使用Docket修改一下swagger的默认数据运行项目,访问http://localhost:8080/swagger-ui.htmlswagger配置package com.sky.config;import org.springframework.context.annotation.Configuration;import springfox.documentation.oas.annotations.EnableOpenApi;import springfox.d原创 2020-07-25 16:31:12 · 6138 阅读 · 1 评论 -
springboot简单使用swagger
导入swagger2和ui依赖<!-- swagger2 --><dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.9.2</version></dependency><!-- swagger-ui -->&l原创 2020-07-25 13:03:47 · 201 阅读 · 0 评论 -
swagger配置扫描接口、扫描路径条件
文章目录创建swagger的springboot项目Docket.select().xxx.build()配置扫描接口条件配置扫描路径条件配置扫描接口、扫描路径条件可一起使用当我们需要扫描指定的包下的接口,然后生成该包下的API,那我们要怎么配置呢?创建swagger的springboot项目Docket.select().xxx.build()在Docket类中有 select() 方法,该方法需要与 build() 一起使用。@Bean public Docket docket()原创 2020-07-25 22:03:55 · 9271 阅读 · 0 评论