com.netflix.karyon.spi
Annotation Type Application


@Documented
@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface Application

An annotation specifying that the containing class is an application which holds the basic functioning of the module.

An application is a special type of AutoBindSingleton which requires a set of Component to be initialized before it.
It is not mandatory to have an application class explicitly annotated with this annotation if there is no dependency on any components or there is a direct dependency on a component i.e. via Inject or AutoBind. In such a case, you can just mark your class as a AutoBindSingleton
All governated classes will be instantiated when karyon initializes.

Controlling the application discovery

The automatic discovery of application can be disabled by setting a property PropertyNames.DISABLE_APPLICATION_DISCOVERY_PROP_NAME available to archaius to true
If there are multiple classes annotated with Application for whatever reasons, one can choose to explicitly tell karyon about the application class by specifying the fully qualified classname as a property with name PropertyNames.EXPLICIT_APPLICATION_CLASS_PROP_NAME