ConfigFactory is the Typesafe Config API entry point for loading configuration values. It builds a hierarchical configuration tree from application resources and supports defaults, overrides, and environment-specific selection. section 7.1 section 7.1.4
Load the default configuration
import com.typesafe.config.ConfigFactory val config = ConfigFactory.load() section 7.1
Choose a configuration source or override strategy when the default application files are not sufficient:
- Call ConfigFactory.load("myapp") to load myapp.conf, myapp.json, or myapp.properties instead of the application-named files. section 7.1.4
- Use -Dconfig.resource for a resource name, -Dconfig.file for a filesystem path, or -Dconfig.url for a URL. section 7.1.4
- Let higher-priority configuration values override definitions supplied by lower-priority defaults. section 7.1.4
Use the configuration hierarchy diagram to see how application properties are grouped beneath a named node. section 7.1
