public class FabricSpringApplication extends Object
Executable Java class to be used as a base for the Fabric-managed Spring Boot applications. Its main purpose is to eliminate the custom code bootstrapping the application, so end-users could create Spring Boot managed process via Fabric without any custom wiring.
FabricSpringApplication can be used in the conjunction with the Fabric Jar Managed Process installer (just
as demonstrated on the snippet below).
process:install-jar -m io.fabric8.process.spring.boot.container.FabricSpringApplication my.group.id my-artifact 1.0
Keep in mind that you don't have to use FabricSpringApplication in order to use Fabric goodies for Spring
Boot (like Fabric starters). However we recommend to use this class as an entry point for your Fabric SpringBoot
integration, as it implements our opinionated view of the proper Fabric+Boot wiring.
In order to specify packages that should be scanned for additional @Component and @Configuration classes, use
standard Spring Boot spring.main.sources system property. For example if your project @Configuration classes are located in
the com.example.project package, you can use the following command to install your jar as a managed process:
process:install-jar -m io.fabric8.process.spring.boot.container.FabricSpringApplication --jvm-options=-Dspring.main.sources=com.example.project my.group.id my-artifact 1.0
| Modifier and Type | Field and Description |
|---|---|
static String |
SPRING_MAIN_SOURCES |
| Constructor and Description |
|---|
FabricSpringApplication() |
public static final String SPRING_MAIN_SOURCES
public org.springframework.context.ConfigurableApplicationContext run(String... args)
public static void main(String[] args)
public FabricSpringApplication parent(org.springframework.context.ConfigurableApplicationContext parent)
Copyright © 2011–2014 Red Hat. All rights reserved.