【发布时间】:2023-03-16 08:17:01
【问题描述】:
我在 Mule 中有一个 REST 服务流:
<flow name="rest-service">
<inbound-endpoint address="http://localhost:9099"/>
<logger message="API request received from #[header:INBOUND:MULE_REMOTE_CLIENT_ADDRESS]" level="INFO" />
<jersey:resources>
component class="com.example.rest.MyResource"/>
</jersey:resources>
</flow>
我想获取组件类MyResource 中的MULE_REMOTE_CLIENT_ADDRESS 属性。我尝试实现MuleContextAware,但无法从MuleContext 对象检索消息属性。
还有其他获取消息属性的方法吗?我正在使用 Mule 3.2.0。
【问题讨论】: