Applications are typically built once (in JAR or WAR) and then deployed into multiple environments. ;The following figure shows some of the different environments an application can be deployed to:
In each of the preceding environments, an application typically ;has the following:
- Connections to databases
- Connections to multiple ;services
- Specific environment configurations
It is a good practice to externalize configurations that change between different environments into a configuration file or database.
Spring Boot provides ;a flexible, standardized approach for externalized configuration.
In this section, we will look at the following:
- How can properties from ;
application.properties
be used inside our services? - How do type-safe Configuration Properties ;make application configuration a cakewalk?
- What kind of support does Spring Boot provide for Spring ;Profiles?
- How can you configure properties in
application.properties
?
In Spring Boot, application.properties
is the default...