|
|
|
@ -12,7 +12,6 @@ import springfox.documentation.service.ApiInfo;
|
|
|
|
|
import springfox.documentation.service.Contact; |
|
|
|
|
import springfox.documentation.spi.DocumentationType; |
|
|
|
|
import springfox.documentation.spring.web.plugins.Docket; |
|
|
|
|
import springfox.documentation.swagger2.annotations.EnableSwagger2; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Swagger2的接口配置 |
|
|
|
@ -20,7 +19,6 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
|
|
|
|
* @author ruoyi |
|
|
|
|
*/ |
|
|
|
|
@Configuration |
|
|
|
|
@EnableSwagger2 |
|
|
|
|
public class SwaggerConfig |
|
|
|
|
{ |
|
|
|
|
/** 是否开启swagger */ |
|
|
|
@ -33,7 +31,7 @@ public class SwaggerConfig
|
|
|
|
|
@Bean |
|
|
|
|
public Docket createRestApi() |
|
|
|
|
{ |
|
|
|
|
return new Docket(DocumentationType.SWAGGER_2) |
|
|
|
|
return new Docket(DocumentationType.OAS_30) |
|
|
|
|
// 是否启用Swagger
|
|
|
|
|
.enable(enabled) |
|
|
|
|
// 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
|
|
|
|
|