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框架,很大程度 ...
随机推荐
- concurrent.futures模块
1.concurrent.futures模块介绍 2.ThreadPoolExecutor线程池使用 3.ProcessPoolExecutor进程池使用 4.其他方法使用 1.concurrent. ...
- django项目环境设置
1.连接数据库,如mysql DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'django_comi ...
- 6. 纯 CSS 绘制一颗闪闪发光的璀璨钻石
原文地址:https://segmentfault.com/a/1190000014652116 HTML代码: <div class="diamond"> <s ...
- 字符串和JSON对象互转的方法
采用Ajax的项目开发过程中,经常需要将JSON格式的字符串返回到前端,前端解析成JS对象(JSON ).字符串转JSON对象 1.eval方式解析.function strToJson(str){ ...
- DEMO: springboot 与 freemarker 集成
直接在 DEMO: springboot 与 mybatis 集成 基础上,进行修改. 1.pom.xml 中引用 依赖 <dependency> <groupId>org.s ...
- Eclipse “cannot be resolved to a type”
遇到这坑爹的问题,网上各种答案. 只有这个能解决我的问题,eclipse机制问题: Eclipse “cannot be resolved to a type”
- VBA 检查模块中是否有某个函数
Function FindProcedures(ByRef wb As Workbook, ByVal Proc As String) As Boolean On Error GoTo Exit ...
- CentOS 7 Tomcat安装
官网: http://tomcat.apache.org/download-80.cgi 下 1.载zip包 >wget http://mirrors.hust.edu.cn/apache/to ...
- MAC CURL : Error:35 SSL certificate problem: Couldn't understand the server certificate format
起因,使用极光推送最新的版本,里面curl使用https请求,而导致证书出错.一看就懵逼了,从来没遇到过这样的问题,二话不说直接百度,然后就更加懵逼了,搜出来的没有中文内容,对于我这种英文渣来说,简直 ...
- 8 python 抽象类
1.抽象类 --类似接口 接口的概念: 自己提供给使用者来调用自己功能的方式\方法\入口, 1.1.java中接口 interface =================第一部分:Java 语言中的 ...