What diference between -Dconfig.resource and -Dcon

2019-07-03 18:22发布

问题:

According to the Akka Configuration documentation:

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

回答1:

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.