I have implemented Swagger and Melody at the same time on my maven Spring Boot Project, but it seems to have a problem that both of them are not running simultaneously, i will have to stop one of the service to use other every time,when i need to use melody i will have to comment code for swagger and viceversa.
I have implemented Swagger and Melody at the same time on my maven Spring Boot Project, but it seems to have a problem that both of them are not running simultaneously, i will have to stop one of the service to use other every time,when i need to use melody i will have to comment code for swagger and viceversa. But when i made other project they are working simultaneously without any issue. I am not able to figure out the reason behind this.Can anyone help me with this
@Configuration
@EnableSwagger2 public class SwaggerConfig {
@Value("${swagger.host}")
private String host;
/**
* Api.
*
* @return the docket
*/
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo()).select()
.apis(Predicates.not(RequestHandlerSelectors.basePackage("org.springframework.boot")))
.apis(Predicates.not(RequestHandlerSelectors.basePackage("org.springframework.cloud")))
.apis(Predicates.not(RequestHandlerSelectors.basePackage("org.springframework.data.rest.webmvc")))
.paths(PathSelectors.any()).build();
}
/**
* Api info.
*
* @return the api info
*/
private ApiInfo apiInfo() {
return new ApiInfoBuilder().title("OodlesDashboard").description("Application for Oodles").version("1.0")
.build();
}
}