Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amitbhoraniya/spring-boot-osgi-demo
Simple Calculator API using Spring Boot OSGi.
https://github.com/amitbhoraniya/spring-boot-osgi-demo
osgi pluggable spring-boot
Last synced: about 1 month ago
JSON representation
Simple Calculator API using Spring Boot OSGi.
- Host: GitHub
- URL: https://github.com/amitbhoraniya/spring-boot-osgi-demo
- Owner: amitbhoraniya
- Created: 2019-03-23T11:59:36.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-02T18:40:08.000Z (almost 4 years ago)
- Last Synced: 2024-05-21T05:51:53.216Z (8 months ago)
- Topics: osgi, pluggable, spring-boot
- Language: Java
- Size: 4.88 KB
- Stars: 16
- Watchers: 2
- Forks: 18
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring Boot OSGi Demo
This is demo application that shows how to use OSGi with Spring Boot.
### Build Application
Execute below maven command, which will create a bundle in `target/deploy` directory and can be deployed in Apache Karaf Container.```
mvn clean install
```### calc-core
Here, calc-core bundle is providing service of Calculator and itself implementing Addition Service.After deploying only calc-core bundle if we call below Rest API.
```
http://localhost:8013/calculator
```
Then, its response would be like```
["Addition"]
```### calc-plugin
Here, calc-plugin is implementing Calculator Service and providing support for Subtraction also. This plugin is dependent on calc-core plugin.After deploying calc-core, if we again call same Rest API.
```
http://localhost:8013/calculator
```
Then, its response would be like```
["Addition","Subtraction"]
```
To perform calculator operation, call below RestAPI.```
http://localhost:8013/calculator/{operation}?n1={n1}&n2={n2}
```For Example,
```
http://localhost:8013/calculator/addition?n1=12&n2=12
```