I start my application using a shell script. in this script i define the values of some variables depending to the detected environment (dev / prod...)
Then I need to use these variables in the springBoot properties yml.
this is my shell script:
#!/bin/bash
ENV_1="env1"
ENV_2="env2"
export projectBaseUrl=
if [ "$environment" == "$ENV_1" ];
then
echo "test here"
projectBaseUrl="https://test"
echo "projectBaseUrl ${projectBaseUrl} "
elif [ "$environment" == "$ENV_2" ];
then
echo "test 2 here"
projectBaseUrl="https://test2"
echo "projectBaseUrl ${projectBaseUrl} "
fi
in the properties file (yml)
project.ws.baseUrl: ${projectBaseUrl}
in the start.sh logs i cann see that projectBaseUrl has the correct value but in the start of the application i have an error
Could not resolve placeholder 'project.ws.baseUrl' in value "${project.ws.baseUrl}"
Any help please ?