OSGi 系列(十八)之 基于注解的 Blueprint
OSGi 系列(十八)之 基于注解的 Blueprint
1. 注解实现 blueprint
第一步:bundle 添加 Bundle-Blueprint-Annotation
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.0.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Blueprint-Annotation>true</Bundle-Blueprint-Annotation>
</instructions>
</configuration>
</plugin>
第二步:karaf 要安装以下 4 个 bundle:
install -s mvn:org.apache.xbean/xbean-bundleutils/3.18
install -s mvn:org.apache.xbean/xbean-finder/3.18
install -s mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.annotation.api/1.0.1
install -s mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.annotation.impl/1.0.1
注意 karaf 4.1.5 上要重启 aries-blueprint:
feature:stop aries-blueprint
feature:start aries-blueprint
或直接在 standard-4.1.5-features.xml 文件中 aries-blueprint 中添加:
<feature name="aries-blueprint" description="Aries Blueprint" version="4.1.5">
<feature>aries-proxy</feature>
<bundle dependency="true" start-level="20">mvn:org.apache.aries/org.apache.aries.util/1.1.3</bundle>
<!-- Making the compatibility bundle a dependency allows it to only be installed on-demand -->
<bundle dependency="true" start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core.compatibility/1.0.0</bundle>
<!-- 添加 Bundle-Blueprint-Annotation 支持 -->
<bundle start-level="20">mvn:org.apache.xbean/xbean-bundleutils/3.18</bundle>
<bundle start-level="20">mvn:org.apache.xbean/xbean-finder/3.18</bundle>
<bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.annotation.api/1.0.1</bundle>
<bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.annotation.impl/1.0.1</bundle>
<bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.api/1.0.1</bundle>
<bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.cm/1.1.0</bundle>
<bundle start-level="20">mvn:org.apache.aries.blueprint/org.apache.aries.blueprint.core/1.8.3</bundle>
<conditional>
<condition>bundle</condition>
<bundle start-level="30">mvn:org.apache.karaf.bundle/org.apache.karaf.bundle.blueprintstate/4.1.5</bundle>
</conditional>
<capability>
osgi.service;effective:=active;objectClass=org.apache.aries.blueprint.services.ParserService,
osgi.extender; osgi.extender="osgi.blueprint";uses:="org.osgi.service.blueprint.container,org.osgi.service.blueprint.reflect";version:Version="1.0"
</capability>
</feature>
2. blueprint 注解使用
http://blog.csdn.net/Rongbo_J/article/details/53728846
OSGi 系列(十八)之 基于注解的 Blueprint的更多相关文章
- Web 前端开发精华文章集锦(jQuery、HTML5、CSS3)【系列十八】
<Web 前端开发精华文章推荐>2013年第六期(总第十八期)和大家见面了.梦想天空博客关注 前端开发 技术,分享各种增强网站用户体验的 jQuery 插件,展示前沿的 HTML5 和 C ...
- 学习ASP.NET Core Razor 编程系列十八——并发解决方案
学习ASP.NET Core Razor 编程系列目录 学习ASP.NET Core Razor 编程系列一 学习ASP.NET Core Razor 编程系列二——添加一个实体 学习ASP.NET ...
- 为什么不建议给MySQL设置Null值?《死磕MySQL系列 十八》
大家好,我是咔咔 不期速成,日拱一卒 之前ElasticSearch系列文章中提到了如何处理空值,若为Null则会直接报错,因为在ElasticSearch中当字段值为null时.空数组.null值数 ...
- Java系列--第八篇 基于Maven的SSME之定时邮件发送
关于ssme这个我的小示例项目,想做到麻雀虽小,五脏俱全,看到很多一些web都有定时发送邮件的功能,想我ssme也加入一下这种功能,经查询相关文档,发现spring本身自带了一个调度器quartz,下 ...
- Hadoop 系列(八)—— 基于 ZooKeeper 搭建 Hadoop 高可用集群
一.高可用简介 Hadoop 高可用 (High Availability) 分为 HDFS 高可用和 YARN 高可用,两者的实现基本类似,但 HDFS NameNode 对数据存储及其一致性的要求 ...
- 【iCore3 双核心板_FPGA】实验二十八:基于SDRAM 的VGA 驱动器的设计
本实验设计的VGA显示驱动完全基于FPGA实现,用SDRAM做缓存设备,通过ARM控制VGA显示的内容.ARM 通过FSMC总线向FPGA发送数据,由于总线的速度和VGA的显示速度与SDRAM的读写速 ...
- BizTalk开发系列(十八) 使用信封拆分数据库消息
之前写了一篇的<BizTalk开发系列(十七) 信封架构(Envelop)> 是关于信封架构及其拆装原理的,都是理论性的内容.信封在BizTalk开发过程中最常用的应该是在读取SQL Se ...
- SSE图像算法优化系列十八:三次卷积插值的进一步SSE优化。
本文是在学习https://blog.csdn.net/housisong/article/details/1452249一文的基础上对算法的理解和重新整理,再次非常感谢原文作者的深入分析以及分享. ...
- 文献综述十八:基于SSH框架的进销存管理系统设计与实现
一.基本信息 标题:基于SSH框架的进销存管理系统设计与实现 时间:2017 出版源:内蒙古科技与经济 文件分类:对框架的研究 二.研究背景 进销存管理系统在各企业中广泛应用,使用SSH框架,很大程度 ...
随机推荐
- 65. sqlserver执行存储过程实例
declare @param varchar(500)exec sp_PUB_GetFlowStatus @ret output,10011,88,1,12print @ret
- phone手机比较
phone 15年5月3大厂商发布的高端机器 高颜值手机 皓月银 http://www.vmall.com/product/1983.html 冰川白 http://www.vmall.com/pro ...
- J2SE 8的Lambda --- functions
functions //1. Runnable 输入参数:无 返回类型void new Thread(() -> System.out.println("In Java8!" ...
- Linux tomcat启动慢, Creation of SecureRandom instance for session ID generation using [SHA1PRNG]took [xx] mil
启动慢的解决链接: http://blog.csdn.net/u011627980/article/details/54024974
- ASP.NET MVC+JQueryEasyUI1.4+ADO.NET Demo
1.JQueryEasyUI使用 JQuery EasyUI中文官网:http://www.jeasyui.net/ JQuery EasyUI中文官网下载地址:http://www.jeasyui. ...
- python之类的相关知识
面向对象技术简介 类: 用来描述具有相同的属性和方法的对象的集合.它定义了该集合中每个对象所共有的属性和方法.对象是类的实例. 类变量:类变量在整个实例化的对象中是公用的.类变量定义在类中且在函数体之 ...
- Shiro权限总结
参考学习地址 shiro 瞅完就会用(ssm+shiro) Spring Shiro配置实现用户认证和授权 anon:它对应的过滤器里面是空的,什么都没做,另外.do和.jsp后面的*表示参 ...
- 第一个struct2程序(2)
第三步 需要使用ActionForm了.在Struts1.x中,必须要单独建立一个ActionForm类(或是定义一个动作Form),而在Struts2中ActionForm和Action已经二合一了 ...
- java开源项目jremoting
https://github.com/jremoting/jremoting jremoting是一个类似dubbo的rpc服务治理框架,并且可以与dubbo相互调用.jremoting的实现是参考了 ...
- Game2048
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...