可以将OSGI与Spring Boot微服务一起使用吗?请详细告诉我 [英] is it possible to use OSGI with spring boot microservices? Please tell me in detail

查看:990
本文介绍了可以将OSGI与Spring Boot微服务一起使用吗?请详细告诉我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将ODL框架用于SDN开发,因为内部OSGI框架用于(karaf).除此之外,我还想使用Spring Boot和Spring Cloud来实现云服务.可以将所有这些框架作为一个单元使用.以及我们如何实现这一目标.

I want to use ODL framework for SDN development, in that internally OSGI framework is used to (karaf). Apart from that i want to use spring boot and spring cloud to achieve cloud services also. It is possible to use these all framework as a single unit. and how we can achieve this please tell.

推荐答案

这个问题有点过于广泛和笼统,但是无论如何我都会尝试做两个假设来回答它:

This questions is somewhat overly broad and generic, but I'll try to answer it anyway making two assumptions:

如果您想在ODL/Karaf中使用Spring Boot/Cloud"in-process",那么答案就是这样的架构毫无意义.据我所知,Karaf(不是ODL)对Spring有一些支持,但是您可能很难将它与ODL很好地"结合起来...

If you want to use Spring Boot / Cloud "in-process", that is within ODL/ Karaf, then the answer to that would be that such an architecture would make little sense. Karaf (not ODL) has some Spring support as far as I know, but you'll probably have a hard time to marry that "nicely" with ODL...

ODL的体系结构是您定义YANG模型,并在其中定义的RPC自动地"作为HTTP REST API(通过称为RESTCONF的东西)公开,然后可以从其他应用程序中使用它们.

The architecture of ODL is that you define YANG models and the RPCs you define in them "automagically" get exposed as HTTP REST APIs (via something called RESTCONF), and you can then consume those from other applications.

但是,如果您的问题只是意味着您可以编写一个单独的新Spring Boot/Cloud应用程序,然后通过远程RESTCONF从该应用程序调用OpenDaylight服务,那么答案是肯定可以做到这一点-以及推荐的集成编写方式

But if by your question you just mean if you can write a separate new Spring Boot / Cloud application and from that invoke OpenDaylight services via remote RESTCONF, then the answer is that this is certainly possible - and the recommended way to write integrations.

顺便说一句:在这种情况下,您可能还对 https://lighty.io 感兴趣.

BTW: In this context, you may also be interested in https://lighty.io.

PS:您可以看看 https://github.com/vorburger/opendaylight-简单/以获得一些启发;但这是一个POC,尚未准备好供您消费.

PS: You could have a look at https://github.com/vorburger/opendaylight-simple/ for some inspiration as well; but that is a POC which is not ready for consumption by you.

这篇关于可以将OSGI与Spring Boot微服务一起使用吗?请详细告诉我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆