From aaf2fc887fdaeb968520d9de4cf06e7c8c4a9b0a Mon Sep 17 00:00:00 2001 From: youjie <272855983@qq.com> Date: Tue, 28 Feb 2023 14:02:47 +0800 Subject: [PATCH] 禁止swagger2 使用swagger3config --- huaheng-wms-core/src/main/java/org/jeecg/utils/Swagger3Config.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/huaheng-wms-core/src/main/java/org/jeecg/utils/Swagger3Config.java b/huaheng-wms-core/src/main/java/org/jeecg/utils/Swagger3Config.java index f0c601a..d54b753 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/utils/Swagger3Config.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/utils/Swagger3Config.java @@ -5,12 +5,12 @@ import java.util.Collections; import java.util.List; import org.jeecg.common.constant.CommonConstant; -import org.jeecg.config.Swagger2Config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j; @@ -32,7 +32,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; @EnableSwagger2 @EnableKnife4j @Import(BeanValidatorPluginsConfiguration.class) -public class Swagger3Config extends Swagger2Config { +public class Swagger3Config implements WebMvcConfigurer { /** * 显示swagger-ui.html文档展示页,还必须注入swagger资源: @@ -49,7 +49,6 @@ public class Swagger3Config extends Swagger2Config { * swagger2的配置文件,这里可以配置swagger2的一些基本的内容,比如扫描的包等等 * @return Docket */ - @Override @Bean(value = "defaultApi2") public Docket defaultApi2() { return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select() -- libgit2 0.22.2