【问题标题】:How to create a simple rest service with cxf and dosgi?如何用 cxf 和 dosgi 创建一个简单的休息服务?
【发布时间】:2020-03-07 11:56:03
【问题描述】:

我尝试从 cxf-dosgi-project 创建一个 rest-service 到我自己的 maven-project 中。我不了解 https://github.com/apache/cxf-dosgi/tree/master/samples/rest 的 dosgi-rest-example 的复杂 maven-pom 结构,并且无法转移它。我尝试了许多不同的依赖项和捆绑选项。

我尝试了几个小时在我自己的 maven 项目中用我自己的 parent-pom“复制”https://github.com/apache/cxf-dosgi/tree/master/samples/rest 的示例。总是试图从依赖项、捆绑包中复制所需的部分……但是每次我得到一个编译的包时,我永远不会得到一个正在运行的 rsa 端点。

我尝试的最后一个测试是https://www.file-upload.net/download-13781406/circlead-rest-test.zip.html

当我在 karaf 的 https://github.com/apache/cxf-dosgi/tree/master/samples/rest 运行示例时,它就像魅力一样。所以我的技能是在 cxf-dosgi-rest-example 的基础上创建我自己的 karaf-rest-example。你有一个可行的例子,或者你能向我解释如何使用这个例子作为新的休息服务的基础,如 karaf-bundle?

【问题讨论】:

    标签: rest maven cxf apache-karaf dosgi


    【解决方案1】:

    几天后,SCR 提供了一个新的rest-example。这很好用。见https://github.com/apache/karaf/tree/master/examples/karaf-rest-example/karaf-rest-example-scr

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-02-08
      • 1970-01-01
      • 2011-02-12
      • 2019-05-06
      • 2014-08-22
      • 1970-01-01
      • 2011-08-23
      相关资源
      最近更新 更多