-
Notifications
You must be signed in to change notification settings - Fork 2
Export spring boot variables
JRichardsz edited this page Jul 15, 2023
·
2 revisions
function export_java_env {
java_environments=""
echo_log "## Exporting Java Environment Variables ##"
while IFS='=' read -r name value ; do
if [[ $name == *'JAVA_'* ]] && [[ $name != "JAVA_HOME" ]] && [[ $name != "JAVA_VERSION" ]]; then
java_environments="$java_environments ${!name} ";
fi
done < <(env)
export SPRINGBOOT_OPTS="$java_environments"
}
export_java_env
java $SPRINGBOOT_OPTS -jar $jar_file_name