簡體   English   中英

如何使用 cxf 和 dosgi 創建一個簡單的 rest 服務?

[英]How to create a simple rest service with cxf and dosgi?

我嘗試從 cxf-dosgi-project 創建一個休息服務到我自己的 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.ZFC35FDC70D5FC69D26EZ883A822C7A53

當我在 karaf 的https://github.com/apache/cxf-dosgi/tree/master/samples/rest運行示例時,它就像魅力一樣。 所以我的技能是在 cxf-dosgi-rest-example 的基礎上創建我自己的 karaf-rest-example。 你有一個工作示例,或者你能向我解釋如何使用這個示例作為新的休息服務的基礎,如 karaf-bundle?

幾天后,SCR 提供了一個新的休息示例。 這工作正常。 https://github.com/apache/karaf/tree/master/examples/karaf-rest-example/karaf-rest-example-scr

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM