I want to set my property source location to point to an external directory from within application.propoerties itself. I know passing command line argument as follows does the job.
java -jar myApp.jar --spring.config.location=/Users/tony/Desktop/override.properties
But I want to set this path from within the application itself rather than passing a command-line argument. I tried adding spring.config.location=/Users/tony/Desktop/override.properties to my application.properties but it doesn't work.
How can I do this?