Introduction
The springboot configuration file can use properties and yaml. It is best to use only one format in a system. If properties and yaml are used in the same location, then properties will cover yaml. Personally recommend using yaml, which supports structure and has a clearer hierarchy.
details
If there are application.yml and application-specific.yml in the system, there are also application.yml and application-specific.yml outside the jar package, according to the priority of Externalized Configuration from high to low is
- application-specific.yml outside the jar package
- jar application.yml
- application-specific.yml in the jar package
- application.yml in the jar package