The values in application.properties and application.yaml are filtered through the existing Environment when they are used, so you can refer back to previously defined values (for example, from System properties or environment variables).
https://docs.spring.io/spring-boot/reference/features/external-config.html