首先,请查看mule-config.xml
中的摘录:
<model name="userModel">
<service name="userService">
<inbound>
<inbound-endpoint address="http://localhost:63080"/>
</inbound>
<outbound>
<filtering-router>
<outbound-endpoint address="vm://userController"/>
<or>
<restlet:uri-template-filter pattern="/users/{userId}" verbs="GET"/>
<restlet:uri-template-filter pattern="/users" verbs="POST"/>
<restlet:uri-template-filter pattern="/users" verbs="PUT"/>
<restlet:uri-template-filter pattern="/users/{userId}" verbs="DELETE"/>
</or>
</filtering-router>
</outbound>
</service>
<service name="userController">
<inbound>
<inbound-endpoint address="vm://userController"/>
</inbound>
<!-- TODO: How to implement UserController -->
<component class="com.ggd543.mulerestletdemo.user.UserController"/>
</service>
</model>
当我将其部署到$MULE_HOME/apps
时,mule抱怨:
PS:我的骡子版本是3.1.2,我正在使用mule-transport-restlet-2.0.jar
我的mule-config.xml
有什么问题吗?
答案 0 :(得分:1)
将<or>
更改为<or-filter>
即可。 doument(http://www.mulesoft.org/documentation/display/RESTLET/User%27s+Guide#User%27sGuide-URITemplateRouting)太旧了。 WTF