Giter Club home page Giter Club logo

example-spring-boot-embedded-felix's Introduction

Example Spring Boot web application running embedded Apache Felix OSGI Container

The idea is to be able to:

  • load basic Spring Boot App running an embedded Felix Framework.
  • Add functionality using plain jars using standard annotations like Spring Web controllers and ServletFilter etc
  • Auto detect and serve embedded static resources

Spring boot

  • Create App Entrypoint as @SpringBootApplication
  • Customise Spring Boot start Banner
  • Configure Spring default logging to use log4j2.xml in resources
  • Add a way for Felix framework to use Spring boot properties in internal environment

Felix

  • Create FelixService as Spring Service Component and ApplicationReadyEvent Event Listener to initialise it
  • Configure Felix to load some predefined framework bundles

Gradle

  • Generate custom start.sh, start.bat script in output distribution
  • Create Task to copy configurable OSGI Framework bundles into framework_bundles folder in distribution
  • Generate an empty plugins folder in the distribution
  • Generate zip and tar.gz distributions which include the ./framework_bundles and ./plugins folder plus start scripts.

Additional Custom Bundles for initial framework load

  • PluginServices

    • Services for turning plain JAR into OSGI bundle using BND tools
    • OSGI bundle activation processing pipeline with hooks for custom processing e.g.
      • Detecting and wiring Servlets, Filters via annotations
      • Detecting and wiring Spring MVC Controllers, RestControllers etc
      • Detecting and wiring custom @AuthRequired annotations etc
      • Detecting static resources
  • PluginFileWatcherService - watch a dir for new jars then use PluginServices to process it.

example-spring-boot-embedded-felix's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.