当前位置:首页-文章-开源技术分享-正文

OSGi 与 Spring 的关联关系

OSGi 与 Spring(或 Spring Boot) 的联合使用,有多种方案,以下为一些实践介绍。

基础知识

关键概念的比较。

file

OSGi Framework

Apache Felix

https://felix.apache.org/documentation/index.html

什么是OSGI,Apache Flex, Apache Karaf, Equiniox, Knopflerfish, Virgo, Blueprint 及 Pax Exam 各自与OSGI有什么关系? - 简书

演示示例

OSGi 与 Spring(或 Spring Boot) 的联合使用,有多种方案,以下为一些实践介绍。

DotCMS

Spring Boot with OSGi

We know enterprise applications like Jira/Confluence, Eclipse, Intellij Idea etc, all application are infinite extensible cause they provide supports to develop and install plugin.

Spring Boot with OSGi. We know enterprise applications like… | by Amit Bhoraniya | Medium

amitbhoraniya/spring-boot-osgi-demo: Simple Calculator API using Spring Boot OSGi.

SpringBoot / OSGi framework

mmornati/springboot-osgi-sample: OSGi framework integrated into SpringBoot application

Connect OSGi and Spring

OSGi is the only solution for proper modularity in Java, on the other hand Springboot is a popular framework in the Java ecosystem. If you have to choose between the two, you can only get the benefits of one of them. This talk demonstrates how to combine the two most popular approaches of developing Java applications and how to benefit from the combined advantages. The talk compares the two approaches in terms of service registration and service binding as well as handling of dynamics. The second part demonstrates an approach for connecting the two worlds and use OSGi services in Spring and Spring beans in OSGi. It will also discuss ways to leverage the modularity aspects and dynamics of OSGi in such an approach.

file

本文原创,作者:Hai,其版权均为春松客服所有。
如需转载,请注明出处:https://www.cskefu.com/2022/12/23/spring-osgi-rel/