I'm running a SpringBoot (2.2.2.RELEASE) java application with springfox.boot.starter:3.0.0
and when I run it locally from within my Eclipse IDE it works well. The problem is that when I package it as Docker image and run the container then when I try to run http://localhost:8089/swagger-ui/#
it displays the default Swagger Petstore
example.
Here is my Docket @Bean:
@Configuration
public class SwaggerConfig {
@Bean
public Docket api() { //
return new Docket(DocumentationType.OAS_30) //
.apiInfo(DEFAULT_API_INFO) //
.select() //
.paths(PathSelectors.regex("/error").negate()) //
.build();
}
}
Obviously it's something related to running it from within a docker container, any idea what's missing to make it work?
Thank you!
EDIT:
Probably worth mentioning that I use to work with springfox:2.9.2
and it worked well both locally and as Docker container.