I am trying to externalize the properties file of my project to pick up placeholder values from outside of the jar
Steps to run:
Created a jar file without application.properties file.
Have certain placeholder variables defined in application-dev.properties for the profile to pick up . For ex :
server.api.url=
spring.profiles.active=
Run the script file from shell script :
#!/bin/ksh
API_URL =
${HOME}/cc_home/tools/cc-tool --string='${cc:app/server.api.url}'
export server.api.url=$API_URL
java -jar wink-tool.jar --spring.profiles.active=dev
echo "END"
It is failing with :
bash: export: `server.api.url=localhostxx': not a valid identifier
As i read
man bash
I get that , "name A word consisting only of alphanumeric characters and underscores, and beginning with an alphabetic character or an underscore. Also referred to as an identifier."
How to now achieve this, to read the properties from Shell script to set up the externalised property defined in application-dev.properties outside the jar, which reads/provide value from the identifiers defined in shell script to deploy the exported configuration during sprinboot jar run?