我有一个要求,我必须通过 HTTPS 使用休息服务,并且必须在运行时获取 URL。为了完成同样的任务,我将 REST 'url' 设置为出站属性,并尝试使用 MEL 获取它
#[message.outboundProperties.'url'
当尝试按照我上面所说的做时,我收到下面提到的编译时错误
org.springframework.beans.MethodInvocationException: Property 'protocol' threw exception; nested exception is java.lang.IllegalArgumentException: Address '#[message.outboundProperties.'url']' for protocol 'http' should start with http://
我做错什么了吗?还是有除此之外实现此要求的最佳方法吗?
<https:outbound-endpoint exchange-pattern="request-response"
method="GET" doc:name="HTTPs with Auth header" address="#[message.outboundProperties.'url']" connector-ref="HTTP_HTTPS"/>
<https:connector name="HTTP_HTTPS" cookieSpec="netscape" validateConnections="true" sendBufferSize="0" receiveBufferSize="0" receiveBacklog="0" clientSoTimeout="10000" serverSoTimeout="10000" socketSoLinger="0" doc:name="HTTP-HTTPS">
<https:tls-key-store path="#[message.outboundProperties.'Storepath']" keyPassword="#[message.outboundProperties.'storepassword']" storePassword="#[message.outboundProperties.'storepassword']"/>
<https:tls-server path="#[message.outboundProperties.'Storepath']" storePassword="#[message.outboundProperties.'storepassword']"/>
</https:connector>