我需要从Web服务中移出m子和码头/球衣。我正在寻找实现当前代码的另一种方法。
我正在这样启动服务-
org.mule.MuleServer -config deploy_jetty_jersey.xml
http://www.mulesource.org/schema/mule/jetty/2.2 http://www.mulesource.org/schema/mule/jetty/2.2/mule-jetty.xsd http://www.mulesource.org/schema/mule/core/2.2 http://www.mulesource.org/schema/mule/core/2.2/mule.xsd http://www.mulesource.org/schema/mule/jersey/2.2 http://www.mulesource.org/schema/mule/jersey/2.2/mule-jersey.xsd http://www.mulesource.org/schema/mule/vm/2.2 http://www.mulesource.org/schema/mule/vm/2.2/mule-vm.xsd“>
<jetty:connector name="httpConnector" useContinuations="true"
configFile="jettyConfig.xml" />
<jetty:endpoint address="http://localhost:8080" name="serverEndpoint"
path="html" synchronous="false" />
<model name="ServiceSample">
<service name="testComponent">
<inbound>
<jetty:inbound-endpoint ref="serverEndpoint" />
</inbound>
</service>
<service name="restTestHello" initialState="started">
<inbound>
<inbound-endpoint address="jersey:http://localhost:7003/rest"
synchronous="true" />
</inbound>
<component>
<singleton-object class="com.rest.RestResource" />
</component>
</service>
</model>
<Set name="handler">
<New id="Handlers" class="org.mortbay.jetty.handler.HandlerCollection">
<Set name="handlers">
<Array type="org.mortbay.jetty.Handler">
<Item>
<New id="Contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection" />
</Item>
<Item>
<New id="DefaultHandler" class="org.mortbay.jetty.handler.DefaultHandler" />
</Item>
<Item>
<New id="StaticHandler" class="org.mortbay.jetty.handler.ResourceHandler" />
</Item>
<Item>
<New class="org.mortbay.jetty.handler.ContextHandler">
<Set name="contextPath">/</Set>
<Set name="resourceBase">
<SystemProperty name="jetty.home" default="." />
XXXXXX
</Set>
<Call name="addHandler">
<Arg>
<New class="org.mortbay.jetty.handler.ResourceHandler" />
</Arg>
</Call>
</New>
</Item>
</Array>
</Set>
</New>
</Set>
<Call name="addLifeCycle">
<Arg>
<New class="org.mortbay.jetty.deployer.WebAppDeployer">
<Set name="contexts">
<Ref id="Contexts" />
</Set>
<Set name="webAppDir">XXX</Set>
</New>
</Arg>
</Call>
<Set name="stopAtShutdown">true</Set>
<Set name="sendServerVersion">true</Set>
<Set name="sendDateHeader">true</Set>
<Set name="gracefulShutdown">1000</Set>
我需要使用类似xml结构的替代软件,以便将Java更改降至最低。
答案 0 :(得分:0)
显而易见的替代方案是移动到较新的Mule版本,并用HTTP侦听器替换码头连接器。如果您使用RAML文件定义REST API,则还可以使用APIKit路由和验证。