Unfortunately, this is not working in my case in the application.properties. ${PID}
works, for instance but not for HOSTNAME.
Also according to Baeldung it should work like this: https://www.baeldung.com/spring-boot-properties-env-variables#bd-use-environment-variables-in-the-applicationproperties-file
Do you know why this is the case?