Interface ApplicationConfig

All Superinterfaces:
org.aeonbits.owner.Config, Serializable

@Immutable @ThreadSafe @LoadPolicy(MERGE) @Sources({"system:env","system:properties","classpath:application.properties"}) public interface ApplicationConfig extends org.aeonbits.owner.Config
ApplicationConfig provides an interface for retrieving configuration values, allowing for implicit type conversion, defaulting, and use of a runtime properties interface to override configured settings.

ApplicationConfig tries to load the configurations from several sources in the following order:

  1. the operating system's environment variables; for instance, an environment variable can be set with export EXAMPLE_CONFIG_KEY_NAME="foo"
  2. the Java system properties; for example, a Java system property can be set using System.setProperty("EXAMPLE_CONFIG_KEY_NAME", "foo")
  3. a file named application.properties placed under CLASSPATH. This file can be put under src/main/resources source directory with contents, for example, EXAMPLE_CONFIG_KEY_NAME=foo
Note that environment config has higher priority than Java system properties. Java system properties have higher priority than file based configuration.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.aeonbits.owner.Config

    org.aeonbits.owner.Config.ConverterClass, org.aeonbits.owner.Config.DecryptorClass, org.aeonbits.owner.Config.DefaultValue, org.aeonbits.owner.Config.DisableableFeature, org.aeonbits.owner.Config.DisableFeature, org.aeonbits.owner.Config.EncryptedValue, org.aeonbits.owner.Config.HotReload, org.aeonbits.owner.Config.HotReloadType, org.aeonbits.owner.Config.Key, org.aeonbits.owner.Config.LoadPolicy, org.aeonbits.owner.Config.LoadType, org.aeonbits.owner.Config.PreprocessorClasses, org.aeonbits.owner.Config.Separator, org.aeonbits.owner.Config.Sources, org.aeonbits.owner.Config.TokenizerClass
  • Method Summary

    Modifier and Type
    Method
    Description
    The name of the Neo4J database that's backing this webservice.
    The "credential" of the basic authentication scheme, using a username and a password.
    The URL to a Neo4j instance.
    The "principal" of the basic authentication scheme, using a username and a password.
  • Method Details

    • neo4jUrl

      @Key("NEO4J_URI") String neo4jUrl()
      The URL to a Neo4j instance.
      Returns:
      a string
    • neo4jUsername

      @Key("NEO4J_USERNAME") String neo4jUsername()
      The "principal" of the basic authentication scheme, using a username and a password.

      It is used to create the token representing the principal and is the "username" part.

      Returns:
      a string
    • neo4jPassword

      @Key("NEO4J_PASSWORD") String neo4jPassword()
      The "credential" of the basic authentication scheme, using a username and a password.

      It is used to create the token representing the principal and is the "password" part.

      Returns:
      a string
    • neo4jDatabase

      @Key("NEO4J_DATABASE") String neo4jDatabase()
      The name of the Neo4J database that's backing this webservice.
      Returns:
      a string