我刚开始学习如何构建 bnd OSGI 项目。我尝试运行一个非常简单的项目,没有任何错误消息,但是当我转到 localhost 时,它显示“HTTP ERROR:404”。
简单的类:
其余构建依赖项
运行依赖项
http错误:
谢谢你的帮助!!
该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]'
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.