Externalizing configuration with properties
Spring Boot offers you more than 1,000 properties for fine-tuning. Spring Boot documentation (https://docs.spring.io/spring-boot/docs/2.0.2.RELEASE/reference/htmlsingle/#common-application-properties) gives an exhaustive list of these properties. You can use these properties to adjust the settings of your Spring application. You can specify these properties via environment variables, Java system properties, JNDI, command line arguments, or property files. But Spring Boot has an order of overriding these properties in case you define same properties on all of them. Let's see the order of evaluation of the properties in the next section.
Order of evaluation for overridden properties
Let's see the following order of evaluation for overridden properties:
- Defined properties for the Devtools global settings in your home directory
- Defined properties for
@TestPropertySource
annotations on your tests - Properties as command-line arguments
- Defined properties from...