We have following properties files in our springboot project.
application-local.yaml
application-develop.yaml
application-qa.yaml
application-uat.yaml
application-prod.yaml
application-default.yaml
application.yaml
From our code i understand that we have one properties file for each envirnonment. But here my question is "application-default.properties/yaml" file will exeucte by any chance? will this file executes only when we call -Dspring.profiles.active=default or is there any case where this file will be executed?
The Environment has a set of default profiles (by default, [default]) that are used if no active profiles are set. In other words, if no profiles are explicitly activated, then properties from application-default are considered.
See documentation
No the default application properties will be "application.yml" If you don't specify any profile. The name of your file "application.default.yml" is confusing yourself. https://docs.spring.io/spring-boot/docs/current/reference/html/features.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With