引入 swagger-annotations 1.5.22 排除knife4j3.0.2 中 swagger-annotations 解决依赖冲突
This commit is contained in:
parent
b86fb4c3f5
commit
5351917b67
14
pom.xml
14
pom.xml
@ -2,7 +2,7 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>cn.iocoder</groupId>
|
||||
<artifactId>dashboard</artifactId>
|
||||
@ -24,7 +24,8 @@
|
||||
<!-- 统一依赖管理 -->
|
||||
<spring.boot.version>2.4.2</spring.boot.version>
|
||||
<!-- Web 相关 -->
|
||||
<knife4j.version>2.0.8</knife4j.version>
|
||||
<knife4j.version>3.0.2</knife4j.version>
|
||||
<swagger-annotations.version>1.5.22</swagger-annotations.version>
|
||||
<!-- DB 相关 -->
|
||||
<mysql-connector-java.version>5.1.46</mysql-connector-java.version>
|
||||
<druid.version>1.2.4</druid.version>
|
||||
@ -104,8 +105,17 @@
|
||||
<artifactId>guava</artifactId>
|
||||
<groupId>com.google.guava</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<groupId>io.swagger</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>${swagger-annotations.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- DB 相关 -->
|
||||
<dependency>
|
||||
|
@ -19,7 +19,7 @@ import springfox.documentation.service.SecurityScheme;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spi.service.contexts.SecurityContext;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@ -32,7 +32,7 @@ import static springfox.documentation.builders.RequestHandlerSelectors.basePacka
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Configuration
|
||||
@EnableSwagger2WebMvc
|
||||
@EnableSwagger2
|
||||
@EnableKnife4j
|
||||
@ConditionalOnClass({Docket.class, ApiInfoBuilder.class})
|
||||
@ConditionalOnProperty(prefix = "yudao.swagger", value = "enable", matchIfMissing = true)
|
||||
|
Loading…
Reference in New Issue
Block a user