您需要将资源与uri模板一起使用,然后通过uri.var访问属性中的uri部分。
<api xmlns="http://ws.apache.org/ns/synapse" name="Test" context="/Test">
<resource methods="POST" uri-template="/{method}">
<inSequence>
<property name="method" expression="get-property('uri.var.method')" scope="default" type="STRING"/>
<switch source="get-property('uri.var.method')">
<case regex="CheckTest">
... Your logic for Check Test...
</case>
<case regex="TransferTest">
... Your logic for Transfer Test...
</case>
</switch>
</inSequence>
</resource>
</api>