Home > OS >  Setting springfox.documentation.enabled=false doesn't disable swagger 3.0
Setting springfox.documentation.enabled=false doesn't disable swagger 3.0

Time:08-30

I tried to disable Swagger 3.0 in production. Some people posted a solution: add springfox.documentation.enabled=false to application-prod.properties, but it doesn't work in my Spring Boot application.

I use Spring Initializr to select Spring Boot 2.7.1, Maven, Java 8, spring-boot-starter-web, and spring-boot-starter-actuator. Then I add dependency below to my pom.xml:

<dependency>
    <groupId>org.springdoc</groupId>
    <artifactId>springdoc-openapi-ui</artifactId>
    <version>1.6.4</version>
</dependency>

Does anyone have any idea?

CodePudding user response:

try it

springdoc.api-docs.enabled=false
springdoc.swagger-ui.enabled=false
  • Related