How to change swagger-ui.html default path

萝らか妹 提交于 2020-03-26 06:07:12

问题


I wanna change my swagger-ui path from localhost:8080/swagger-ui.html to localhost:8080/myapi/swagger-ui.html in springboot redirect is helpless to me


回答1:


If you are using spring boot then please update application.properties file and write here

server.servlet.context-path=/myapi

it will redirect you as you want.



来源:https://stackoverflow.com/questions/57193286/how-to-change-swagger-ui-html-default-path

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