0

我刚开始学习如何构建 bnd OSGI 项目。我尝试运行一个非常简单的项目,没有任何错误消息,但是当我转到 localhost 时,它显示“HTTP ERROR:404”。

简单的类:

在此处输入图像描述

一个激活器类: 在此处输入图像描述

其余构建依赖项

在此处输入图像描述

运行依赖项

在此处输入图像描述

http错误:

在此处输入图像描述

谢谢你的帮助!!

4

2 回答 2

4

org.amdatu.web.rest.wink捆绑包的最新 2.0.4 版本不能很好地与 Felix Http Jetty 3.x 配合使用。

如果您将该捆绑包的版本固定到 2.0.3 版本,则应该可以按预期工作。为此,请将您的-runbundlesorg.amdatu.web.rest.wink条目更改为:runbnd.bndrun

org.amdatu.web.rest.wink;version='[2.0.3,2.0.3]'

于 2016-06-24T06:57:54.703 回答
3

Your class is annotated with jax-rs annotations and publishes an OSGi service. If this exposes the services as a REST resources depends on the bundles you install.

You have to install a bundle that watches for such services and creates the REST endpoints for them.

See enter link description here I think you at least need to also add the org.amdatu.web.wink bundle to your bdnrun file.

于 2016-06-22T04:49:18.223 回答