In my case i have declared swagger @Bean in 2 different class. Once i removed from one class it resolved.
@Configuration
@EnableSwagger2
public class EnrollmentSecureConfig {
@Bean //------> 1st time
public Docket api() {}
}
@Configuration
@EnableSwagger2
public class EnrollmentSecureConfig {
@Bean //-----?2nd time
public Docket api() {}
}