Interface Configuration.Builder

Enclosing interface:
Configuration

public static interface Configuration.Builder
Build Configuration manually explicitly loading all the configuration as key value pairs.

Building configuration this way does NOT automatically load resources like application.properties and also does NOT load ConfigurationSource. ALL configuration is explicitly loaded via calls to put(String, String), putAll(Map).

  • Method Details

    • put

      Put an entry into the configuration.
    • putAll

      Configuration.Builder putAll(Map<String,?> sourceMap)
      Put entries into the configuration.
    • putAll

      Put entries into the configuration from properties.
    • load

      Configuration.Builder load(String resource)
      Load the resource using the extension to determine the parser to use.

      By default, resources with .properties and .yaml extensions are supported.

      Parameters:
      resource - The resource with configuration content
    • load

      Load the file using the file extension to determine the parser to use.

      By default, files with .properties and .yaml extensions are supported.

      Parameters:
      file - The file with configuration content
    • eventRunner

      Optionally set the event runner to use . If not specified a foreground runner will be used.
    • log

      Optionally set the log to use. If not specified then a logger using System.Logger will be used.
    • resourceLoader

      Configuration.Builder resourceLoader(ResourceLoader resourceLoader)
      Optionally set the resource loader to use. If not specified then class path based resource loader is used.
    • includeResourceLoading

      Configuration.Builder includeResourceLoading()
      Specify to include standard resource loading.

      This includes the loading of application.properties, application.yaml etc.

    • build

      Configuration build()
      Build and return the Configuration.

      Performs evaluation of property values that contain expressions (e.g. ${user.home}) and returns the configuration.