Springfox Swagger generating requests with port 80 for HTTPS URLS

点点圈 提交于 2019-12-03 17:27:04

I had the same issue. It is because Swagger uses a class from Spring Framework which is adding the port 80 to the host property in the /v2/api-docs json response (Check Swagger2Controller.class). I had this issue with spring framework version 4.1.4.Release. Upgrading to latest version 4.3.2.Release fixed it.

Hit the same issue, but rather than upgrade the spring framework libraries as per @Akshay answer (thanks for pointing out the Swagger2Controller.class), I added the following property to my application-dev.yml file (replace hostname with your host).

springfox.documentation.swagger.v2.host: hostName:443

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!