Spring Boot looks for properties using a specific order:
- Command line arguments
- Java System properties (System.getProperties())
- OS environment variables
- JNDI attributes from java:comp/env
- A RandomValuePropertySource that only has properties in random.*
- Application properties outside of your packaged jar (application.properties including YAML and profile variants)
- Application properties packaged inside your jar (application.properties including YAML and profile variants)