I'm running STS on a mac (10.11.5 El Capitan).
I created a basic Spring Boot application which needs to read an external log4j.properties file on my file system. I created a folder on my machine, set a system variable (LOG_CONFIG_HOME) in ~/.bash_profile and when i 'echo $LOG_CONFI_HOME', i see the correct path.
In the Boot application.yml file, i have this:
...
logging:
config: ${LOG_CONFIG_HOME}/log4j.properties
...
When I run this as a Spring Boot application, i get
'Could not resolve placeholder 'LOG_CONFIG_HOME' in string value "${LOG_CONFIG_HOME}/log4j.properties".
I searched stack & googled trying to solve this.
One suggestion was to restart eclipse. I did that but still the error persists.
Another was to run 'eclipse' from the command line b/c otherwise, it doesn't have access to system variables (???). Doesn't seem legit - i tried to do this but in the STS folder, all i have is STS.app so no clue how to run this from the command line.
I even restarted my machine.
What do i have to do to fix this? This application (with the externalized log config) has to also run on windows as well, so any mac-specific tricks won't work.