Skip to content

vakho10/osgi-spring-boot-example

Repository files navigation

OSGI Spring Boot Example

Overview

This is an example project which demonstrates how to integrate Spring Boot application into OSGI environment. This example takes after this example, but I've added BundleContext as a property of BundleService bean class. Hence, it is now possible to use @Autowired annotation and retrieve BundleContext class dynamically.

Project Structure

  • osgi-spring-boot - Exposes HelloService API interface. Has REST services to call HelloService implementers and see the results.
  • hello-service-eng - Implements HelloService provided by our osgi-spring-boot applicaiton.

Scheme Image

Secured REST Pages (/admin)

I've also added secured REST endpoint which uses certificate authentication. I did authentication configuration according to this tutorial. Use client.p12 file and access /admin page to test that it works.

How to Run

Execute mvn clean package and deploy JAR files generated in target/ folders.

FAQs

There are no FAQs. If you have questions, just ask :)

About

Spring boot example for OSGI environment with BundleContext autowired.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages