Commit aaf2fc887fdaeb968520d9de4cf06e7c8c4a9b0a
1 parent
9f38dea5
禁止swagger2 使用swagger3config
Showing
1 changed file
with
2 additions
and
3 deletions
huaheng-wms-core/src/main/java/org/jeecg/utils/Swagger3Config.java
@@ -5,12 +5,12 @@ import java.util.Collections; | @@ -5,12 +5,12 @@ import java.util.Collections; | ||
5 | import java.util.List; | 5 | import java.util.List; |
6 | 6 | ||
7 | import org.jeecg.common.constant.CommonConstant; | 7 | import org.jeecg.common.constant.CommonConstant; |
8 | -import org.jeecg.config.Swagger2Config; | ||
9 | import org.springframework.context.annotation.Bean; | 8 | import org.springframework.context.annotation.Bean; |
10 | import org.springframework.context.annotation.Configuration; | 9 | import org.springframework.context.annotation.Configuration; |
11 | import org.springframework.context.annotation.Import; | 10 | import org.springframework.context.annotation.Import; |
12 | import org.springframework.web.bind.annotation.RestController; | 11 | import org.springframework.web.bind.annotation.RestController; |
13 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; | 12 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; |
13 | +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||
14 | 14 | ||
15 | import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j; | 15 | import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j; |
16 | 16 | ||
@@ -32,7 +32,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; | @@ -32,7 +32,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; | ||
32 | @EnableSwagger2 | 32 | @EnableSwagger2 |
33 | @EnableKnife4j | 33 | @EnableKnife4j |
34 | @Import(BeanValidatorPluginsConfiguration.class) | 34 | @Import(BeanValidatorPluginsConfiguration.class) |
35 | -public class Swagger3Config extends Swagger2Config { | 35 | +public class Swagger3Config implements WebMvcConfigurer { |
36 | 36 | ||
37 | /** | 37 | /** |
38 | * 显示swagger-ui.html文档展示页,还必须注入swagger资源: | 38 | * 显示swagger-ui.html文档展示页,还必须注入swagger资源: |
@@ -49,7 +49,6 @@ public class Swagger3Config extends Swagger2Config { | @@ -49,7 +49,6 @@ public class Swagger3Config extends Swagger2Config { | ||
49 | * swagger2的配置文件,这里可以配置swagger2的一些基本的内容,比如扫描的包等等 | 49 | * swagger2的配置文件,这里可以配置swagger2的一些基本的内容,比如扫描的包等等 |
50 | * @return Docket | 50 | * @return Docket |
51 | */ | 51 | */ |
52 | - @Override | ||
53 | @Bean(value = "defaultApi2") | 52 | @Bean(value = "defaultApi2") |
54 | public Docket defaultApi2() { | 53 | public Docket defaultApi2() { |
55 | return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select() | 54 | return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select() |