So you wanna deploy Spring application into OSGi?In the older versions of the Karaf, ServiceMix and Fuse we recommended to use Spring Dynamic Modules to deploy applications based on the Spring framework. As Spring DM project is not actively maintained anymore, we currently don't recommend to use it. Moreover due to the fact that there is no other alternative for Spring deployments in the OSGi environment, we don't recommend provisioning Spring-based applications into the OSGi anymore.
Spring Boot containerThe recommended approach for working with the Spring applications in the Fabric8 environment is to use the Spring Boot container - the flat classpath microservice provisioned and managed by the Fabric8.
You can provision Spring Boot container either as a managed JVM process or as a Docker container.
Spring Boot container comes with many useful utilities that makes it much easier to use Apache Camel and ActiveMQ. Spring Boot containers can be also aware of the Gateway, ZooKeeper registry and the other Fabric8 components.