Creating Custom Feature

    is a feature instance class, which should be immutable to avoid unintended side-effects in a highly concurrent environment.Feature implementation should be thread-safe as it will be called from multiple threads.

    The Feature companion object conforms the ApplicationFeature interface and acts as a glue to construct the actual with the right Configuration.

    1. fun Application.main() {
    2. prop = "Hello" // configuration script
    3. }

    See a complete example in the .