Swagger报错404解决办法
我在进行开启Swager的时候,习惯性的使用了以前端口号+/swagger-ui.html的这一条路径(http://localhost:8088/shequapi/swagger-ui.html)
查看端口号
查看Swagger的访问地址
按照之前的配置访问Swagger出现了404
但是公司的application.properties中发现他有这个配置server.servlet.context-path=/shequapi
查看application.properties发现了server.servlet.context-path=/shequapi的配置
所以在访问swagger的时候地址不对
因此在访问路径上加上了/shequapi后就显示成功了
(http://localhost:8088/shequapi/swagger-ui.html)