1.

What are the possible sources of external configuration?

Answer»
  • Spring Boot allows the developers to run the same application in DIFFERENT environments by making use of its feature of external configuration. This uses environment variables, properties files, command-line ARGUMENTS, YAML files, and system properties to mention the required configuration properties for its corresponding environments. Following are the sources of external configuration:
    • Command-line properties – Spring Boot provides support for command-line arguments and CONVERTS these arguments to properties and then adds them to the set of environment properties.
    • Application Properties – By DEFAULT, Spring Boot searches for the application properties file or its YAML file in the current directory of the application, classpath root, or config directory to load the properties.
    • Profile-specific properties – Properties are loaded from the application-{profile}.properties file or its YAML file. This file RESIDES in the same location as that of the non-specific property files and the {profile} placeholder refers to an active profile or an environment.


Discussion

No Comment Found