Mule http代理需要双斜杠(无法通过端点路由事件)



我有http代理的mule配置,如下所示:

<pattern:http-proxy name="xxx-service-http-proxy">
<http:inbound-endpoint address="http://localhost:8080" />
<http:outbound-endpoint host="localhost" port="8589" />
</pattern:http-proxy>

现在当我击中http://localhost:8080/swagger-ui.html。我收到消息

Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=http://localhost:8589swagger-ui.html

但当我击中http://localhost:8080//swagger-ui.html。一切正常(需要双斜杠(。有人能告诉我哪里出了错吗。

Http代理的文档没有提到这一点:https://docs.mulesoft.com/mule-runtime/3.5/http-proxy-pattern

我认为问题的出现是因为根本没有可附加的基本路径。

尝试将显式路径参数添加到出站:

<http:outbound-endpoint host="localhost" port="8589" path="/" />

或者使用出站的URL样式:

<http:outbound-endpoint address="http://localhost:8589" />

最新更新