如何使用cxf和dosgi创建简单的rest服务?

问题描述 投票:0回答:1

我尝试将休息服务从cxf-dosgi-project创建到我自己的maven-project中。我不了解https://github.com/apache/cxf-dosgi/tree/master/samples/rest上的dosgi-rest-example的复杂的maven-pom结构,因此无法传输它。我尝试了许多不同的依赖项和bundle-options。

我花了数小时试图用自己的父pom在自己的maven项目中“复制” https://github.com/apache/cxf-dosgi/tree/master/samples/rest的示例。总是尝试从依赖项,bundle-otions中复制所需的部分,但是……每当我得到一个已编译的bundle时,我就永远不会得到运行中的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个回答
0
投票

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

© www.soinside.com 2019 - 2024. All rights reserved.