在启动时加载swagger-ui时pom.xml <groupId>io.springfox</groupId>", "io.swagger.api" , "io.swagger.configuration"})
public class Swagger2SpringBoot extends SpringBootSer
我们有一个带有springfox-swagger2和springfox-swagger-ui的SpringBoot (1.5.12版) REST Api (2.9.2版) @EnableSwagger2public class Application extends SpringBootServletInitializer { public Docket swagger(){
我使用自动生成swagger并创建UI,如下所示。当我在我的机器上运行服务器时,一切工作正常,但是当我在Kubernetes上运行服务器时,UI找不到doc.json并显示Failed to load spec.可以看出,问题出在指向本地主机的URL,并且无法从集群外部访问它。如果我使用http://my_public_url/reverse_proxy_entry_for_my_service/swagger&