【问题标题】:deploy multiple RESTful service bundles in ServiceMix/FUSE 4.3在 ServiceMix/FUSE 4.3 中部署多个 RESTful 服务包
【发布时间】:2011-05-30 06:21:27
【问题描述】:

我正在使用 apache-servicemix-4.3.0-fuse-03-00.tar.gz 附带的示例 cxf-jaxrs 来研究如何部署多个提供不同 RESTful 服务的包。我所做的是将 cxf-jaxrs 示例复制到 cxf-jaxrs-example-1 中,并修改 pom.xml 和 beans.xml。修改如下:

1. pom.xml
version: 4.3.0-2-fuse-03-00
name: Apache ServiceMix Example 2:: CXF JAX-RS OSGI
2. beans.xml
<jaxrs:server id="customerService2" address="/crm2"> 

然后我做了两个包。一个是原始示例包 cxf-jaxrs-4.3.0-fuse-03-00.jar 另一个是修改后的一个 cxf-jaxrs-4.3.0-2-fuse-03-00.jar 我复制了它们进入“部署”目录。

servicemix 启动后,我看到两个包都处于活动状态并成功启动。

但是,我只能在一个捆绑包中访问 RESTful 服务。当我输入“http://localhost:8080/cxf/crm2/customerservice/customers/123”时,我得到“未找到服务”。错误。当我停止另一个示例包(原始包)时,我可以毫无问题地访问“http://localhost:8080/cxf/crm2/customerservice/customers/123”。

我做错了什么??它应该在上下文路径“/crm”和“/crm2”中提供 RESTful 服务。

【问题讨论】:

    标签: rest apache-servicemix


    【解决方案1】:

    问题已解决。我的错。忘记修改 CustomerService 类的路径注解

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多