
解决若依微服务前端调用新增服务接口报:404 not found
异常现象:异常描述:服务启动后,用swagger和postman请求(没有走网关),请求成功,走网关,请求失败。列如:不走网关的路径为:localhost:8081/workbench/getList走网关的路径为:localhost:8080/workbench/getList异常原因:是因为在网关配置文件中,routes.filters -StripPrefix=1导致的解决方案:方案1.将f
·
异常现象:

异常描述:
服务启动后,用swagger和postman请求(没有走网关),请求成功,走网关,请求失败。
列如:
不走网关的路径为:localhost:8081/workbench/getList
走网关的路径为:localhost:8080/workbench/getList
异常原因:
是因为在网关配置文件中,routes.filters -StripPrefix=1导致的

解决方案:
方案1.将filters: -StipPrefix=1注释掉

方案2:修改配置文件的请求路径和前端页面发起请求的路径,比如:新增一个cms

前端请求地址为:localhost:8080/cms/workbench/getList
更多推荐


所有评论(0)