想使用 CAMEL、CXF 和 Karaf 访问静态资源 [英] Want to access static resource using CAMEL, CXF and Karaf

查看:30
本文介绍了想使用 CAMEL、CXF 和 Karaf 访问静态资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 CAMEL、CXF 和 Karaf 的新手.我想使用带有 CXF 和 KARAF 的 CAMEL 访问静态文件.想知道这样做的最佳方法.我在网上搜索过,发现基于 CXF 的休息 Web 服务可以写成相同的.有没有其他更简单的方法.我们正在使用 jboss FUSE 服务器.

I am new to CAMEL, CXF and Karaf. I want to access static file using CAMEL with CXF and KARAF. Wanted to know the best way to do that. I have searched through net and found that CXF based rest web service can be written for the same. Is there any other simpler way for this. We are using jboss FUSE server.

推荐答案

有更好的方法来做同样的事情.

Got a better way to do the same.

  1. 第 1 步在您的 maven 插件中添加 <_wab>src/main/webapp/标签,以便您的包可以被 karaf 容器视为 WAB.使用 和 来声明您的自定义上下文路径.默认情况下,maven 将 Bundle-SymbolicName 作为上下文.
  2. 第 2 步.编写 web.xml.将其放在/src/main/webapp/WEB-INF 下.
  3. 第 3 步.将您的静态资源文件放在 webapp 文件夹下.
  4. 第 4 步.使用 maven 命令 mvn clean install 构建代码以生成包 jar 并将 jar 部署到 karaf 中
  5. 第 5 步使用以下链接访问静态资源.http://:8181//
  1. Step 1 Add <_wab>src/main/webapp/ tag in you maven pluggin so that your bundle can be treated as WAB by karaf container. Use and to declare your custom context path. By default maven will take Bundle-SymbolicName as context.
  2. Step 2. Write web.xml. Place it under /src/main/webapp/WEB-INF.
  3. Step 3. Place your static resource file under webapp folder.
  4. Step 4. Build the code to generate bundle jar using maven command mvn clean install and deploy the jar in karaf
  5. Step 5 Use below link to access the static resource. http://:8181//

这篇关于想使用 CAMEL、CXF 和 Karaf 访问静态资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆