比如 http://localhost:9100/test.do/localhost:9101/account/login.do?account=xxx&pwd=xxx
我访问 localhost:9100/test.do,转发到任意一个地址的任意一个接口,url要怎么写,转发代码要怎么写?
转发服务器和目标服务器都是我自己写的代码。
补充:目标服务是不对外暴露的,所以不能用重定向。
比如 http://localhost:9100/test.do/localhost:9101/account/login.do?account=xxx&pwd=xxx
我访问 localhost:9100/test.do,转发到任意一个地址的任意一个接口,url要怎么写,转发代码要怎么写?
转发服务器和目标服务器都是我自己写的代码。
补充:目标服务是不对外暴露的,所以不能用重定向。
https://blog.csdn.net/qq_29777207/article/details/112293708
你看看这篇文章呢,我觉很符合你的要求,用 springboot 实现 nginx 的代理功能