OSGI与cxf结合发布rest接口
来源:互联网 发布:女神联盟英雄升阶数据 编辑:程序博客网 时间:2024/05/16 17:10
简介:
http://cxf.apache.org/distributed-osgi.html
single bundle介绍:
http://cxf.apache.org/dosgi-single-bundle-distribution.html
需要jar包
cxf-dosgi-ri-singlebundle-distribution-1.3.jar
下载地址 http://cxf.apache.org/dosgi-releases.html
例子:
http://www.bubuko.com/infodetail-1252224.html
http://eclipsesource.com/blogs/2014/02/04/step-by-step-how-to-bring-jax-rs-and-osgi-together/
---其他内容,自行脑补
Activator.java
public void start(BundleContext bundleContext) throws Exception {
System.out.println("start--oDemo");
Activator.context = bundleContext;
JAXRSServerFactoryBean restServer = new JAXRSServerFactoryBean();
restServer.setResourceClasses(HelloWorldServiceImpl.class);
restServer.setAddress("http://localhost:9999/");
restServer.create();
System.out.println("created==========");
}
HelloWorldServiceImpl.JAVA
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
@Path("/json")
public class HelloWorldServiceImpl {
@GET
@Path("/a")
@Produces({ "application/json"})
public String sayHello() {
System.out.println("hello");
return "{ssss:4444}";
}
}
jar包
- OSGI与cxf结合发布rest接口
- Spring与CXF结合发布WebService
- spring整合cxf方式发布的rest webservice,调用接口
- 使用cxf发布rest服务接口,和spring的整合
- 使用CXF发布基于maven的REST webservice接口
- OSGI与Android结合
- Webservice实践(七)CXF 与Spring结合+tomcat发布
- CXF系列之JAX-RS:CXF发布与调用REST服务
- CXF系列之JAX-RS:CXF与spring集成发布REST服务
- OSGI通过CXF发布WebService第一例
- CXF发布restful接口
- OSGI系列 Servlet-Rest发布Http服务
- Spring整合CXF 发布webservice接口服务器(普通及REST)和客户端,WSDL简单解析
- CXF 与Spring结合
- cxf 与spring集成,发布restful接口,返回json数据
- 使用CXF和spring发布rest服务
- webservice--CXF发布REST的服务
- cxf发布rest风格的webService
- 集群session共享机制
- 【数据结构与算法】十六 二叉树遍历 BFS 广度优先 递归算法
- 跨服务器Session共享的四种方法
- IO学习(九)字节缓冲流,字符缓冲流
- 阅读需要马上开始------每天时时刻刻要在心中默念
- OSGI与cxf结合发布rest接口
- 剑指offer 面试题51 java实现
- DP 动态规划 Problem J 1010 上楼梯问题
- Condition的理解
- android发送短信
- [BZOJ1051] [HAOI2006] 受欢迎的牛 - tarjan强连通分量
- 关于StringBuffer和StringBuilder的一点看法
- bzoj 1552: [Cerc2007]robotic sort(splay)
- <canvas>学习笔记——如何使用<canvas>