Exception Mule HTTP读取超时重定向
我试图通过在出站端点上允许短http响应超时来故意导致responseTimeout异常。当超时发生时,我想重定向到一个错误消息页面,如下所示。但是,我只收到异常消息作为响应,从未被重定向到我指定的页面。有什么想法吗?塔克斯Exception Mule HTTP读取超时重定向,exception,redirect,timeout,mule,Exception,Redirect,Timeout,Mule,我试图通过在出站端点上允许短http响应超时来故意导致responseTimeout异常。当超时发生时,我想重定向到一个错误消息页面,如下所示。但是,我只收到异常消息作为响应,从未被重定向到我指定的页面。有什么想法吗?塔克斯 <flow name="userflow" processingStrategy="synchronous" doc:name=""> <http:inbound-endpoint host="${server_id}" port="8091" r
<flow name="userflow" processingStrategy="synchronous" doc:name="">
<http:inbound-endpoint host="${server_id}" port="8091" responseTimeout="100"
path="${path}/nexonplayrock" exchange-pattern="request-response" doc:name="HTTP" />
<http:outbound-endpoint exchange-pattern="request-response" host="localhost"
port="8091" path="${path}/test" method="POST" responseTimeout="1"
mimeType="application/json" >
</http:outbound-endpoint>
<choice-exception-strategy >
<catch-exception-strategy when="exception.causedBy(java.net.SocketTimeoutException)" doc:description="Response Timeout">
<logger level="INFO" message="HTTP Response Timed Out!" doc:name="Logger"/>
<http:response-builder status="302" doc:name="HTTP Response Builder">
<http:location value="${path2}/error" />
</http:response-builder>
</catch-exception-strategy>
</choice-exception-strategy>
</flow>
引发异常时,处理是否达到捕获异常策略?您看到打印的异常策略中的记录器了吗?是的,并且没有重定向到错误页面。您可以发布http客户端代码吗?客户端将执行重定向。