I have swagger plugged in to my spring boot application. Spring boot allows you to have property files for each environment that you have. Is there a way to disable swagger fo
have configuration for env
@Configuration
@EnableSwagger2
@Profile("devone")
application.yaml
profiles: active: ${MY_ENV:devone}
MY_ENV you will read from file, like .env
.env file content: MY_ENV=prod
In the production keep other .env file only for production credentials.