1. 创建maven工程
通过eclipse来创建
2. 编写类
最少包含两个函数(非main),一个用来响应启动,一个用来响应停止
3. 配置osgi属性
在resource目录下新建目录"/OSGI-INF/blueprint",同时创建配置文件"blueprint.xml"
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xmlns:jaxrs="http://cxf.apache.org/blueprint/jaxrs" xmlns:cxf="http://cxf.apache.org/blueprint/core"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://cxf.apache.or g/blueprint/jaxrs http://cxf.apache.or g/schemas/blueprint/jaxrs.xsd
http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd">
<bean id="hswtest" class=