Spring Boot — Precedence Order Among Properties File | Code Factory

Reference Link : Link

Donate : Link

Spring Boot lets you externalize your configuration so that you can work with the same application code in different environments. You can use Properties files, YAML files, Environment variables and Command-line arguments to externalize configuration. Property values can be injected directly into your beans by using the @Value annotation, accessed through Spring’s Environment abstraction, or be bound to structured objects through @ConfigurationProperties.

Spring Boot uses a very particular PropertySource order that is designed to allow sensible overriding of values.

Properties are considered in the following order :

  1. Devtools global settings properties on your home directory (~/.spring-boot-devtools.properties when devtools is active).

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store