Search code examples
scalaakkaconfigtypesafe-config

What diference between -Dconfig.resource and -Dconfig.file in akka?


According to the Akka Configuration documentation:

What is the difference between the -Dconfig.resource and -Dconfig.file arguments?


Solution

  • System properties can be used to force a different config source:

    • config.resource specifies a resource name - not a basename, i.e. application.conf not application
    • config.file specifies a filesystem path, again it should include the extension, not be a basename
    • config.url specifies a URL

    Loading configuration with -Dconfig.file is the way to specify an external file to load,

    -Dconfig.resource - for internal resources.

    Taken from: Configuration file syntax and features.