Swagger3默认是启用的,即引入包就启用。
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<version>3.0.3</version>
</dependency>
若要在SpringBoot起禁用Swagger3,在application.yml文件中添加配置
springfox:
documentation:
enabled: false