I am using Springfox Swagger2 with Spring boot 1.5.9.
I can access swagger UI on this link.
http://localhost:8090/swagger-ui.html
How can I change it to be available on following URL?
http://localhost:8090/my/custom/path/swagger-ui.html
@EnableSwagger2
public class Configuration {
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("my.favorite.package"))
.paths(PathSelectors.any())
.build()
.apiInfo(apiInfo()).useDefaultResponseMessages(false);
}
private ApiInfo apiInfo() {
return new ApiInfoBuilder().title("My title").version("1.0")
.contact(new Contact("Blah", "blah.com", "[email protected]")).build();
}
}