私はミュールスタジオを使用しています。
たとえば、localhost:8080/?first=value1&second=value2を実行すると、2 つの変数とその値を取得したいと思います。
1 番目: 値 1 2 番目: 値 2
次のように、スプリッターを使用して最初の「/」を削除します。
[regex('/(.*?)', message.payload)]
しかし、今私は得る:
?first=value1&second=value2
message.inboundProperties['parameter'] を使用してパラメーターを抽出できます。
例えば:
<logger level="WARN" message="#[message.inboundProperties['first']]" />
<logger level="WARN" message="#[message.inboundProperties['second']]" />
パラメータは次の 3 つの方法で抽出できます。
http.query.params
次のフローを実行することを検討してください。
<flow name="mule-configFlow1" doc:name="mule-configFlow1">
<http:inbound-endpoint address="http://localhost:8082/app" />
<http:body-to-parameter-map-transformer />
<logger level="ERROR" />
<logger level="ERROR" message="Payload is: #[payload]" />
<json:object-to-json-transformer />
</flow>