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
spring.profiles.active=production with @Profile("!production") worked for me to turn off swagger in prod.
Ex :-
@Profile("!production") @Component @EnableSwagger2 public class SwaggerConfig { //TODO }