diff --git a/apollo-adminservice/src/main/scripts/startup.sh b/apollo-adminservice/src/main/scripts/startup.sh index 397edf73f3c..392e4ed4fc2 100644 --- a/apollo-adminservice/src/main/scripts/startup.sh +++ b/apollo-adminservice/src/main/scripts/startup.sh @@ -16,10 +16,13 @@ mkdir -p $LOG_DIR ########### The following is the same for configservice, adminservice, portal ########### export JAVA_OPTS="$JAVA_OPTS -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+DisableExplicitGC -XX:+ScavengeBeforeFullGC -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+ExplicitGCInvokesConcurrent -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8 -Djava.security.egd=file:/dev/./urandom" +# DS_URL, DS_USERNAME, DS_PASSWORD are deprecated, please use SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME, SPRING_DATASOURCE_PASSWORD instead # DataSource URL USERNAME PASSWORD if [ "$DS_URL"x != x ] then - export JAVA_OPTS="$JAVA_OPTS -Dspring.datasource.url=$DS_URL -Dspring.datasource.username=$DS_USERNAME -Dspring.datasource.password=$DS_PASSWORD" + export SPRING_DATASOURCE_URL=$DS_URL + export SPRING_DATASOURCE_USERNAME=$DS_USERNAME + export SPRING_DATASOURCE_PASSWORD=$DS_PASSWORD fi export JAVA_OPTS="$JAVA_OPTS -Dserver.port=$SERVER_PORT -Dlogging.file=$LOG_DIR/$SERVICE_NAME.log -XX:HeapDumpPath=$LOG_DIR/HeapDumpOnOutOfMemoryError/" diff --git a/apollo-configservice/src/main/scripts/startup.sh b/apollo-configservice/src/main/scripts/startup.sh index 52a52ffae3d..9e2d3c8319e 100644 --- a/apollo-configservice/src/main/scripts/startup.sh +++ b/apollo-configservice/src/main/scripts/startup.sh @@ -16,10 +16,13 @@ mkdir -p $LOG_DIR ########### The following is the same for configservice, adminservice, portal ########### export JAVA_OPTS="$JAVA_OPTS -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+DisableExplicitGC -XX:+ScavengeBeforeFullGC -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+ExplicitGCInvokesConcurrent -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8 -Djava.security.egd=file:/dev/./urandom" +# DS_URL, DS_USERNAME, DS_PASSWORD are deprecated, please use SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME, SPRING_DATASOURCE_PASSWORD instead # DataSource URL USERNAME PASSWORD if [ "$DS_URL"x != x ] then - export JAVA_OPTS="$JAVA_OPTS -Dspring.datasource.url=$DS_URL -Dspring.datasource.username=$DS_USERNAME -Dspring.datasource.password=$DS_PASSWORD" + export SPRING_DATASOURCE_URL=$DS_URL + export SPRING_DATASOURCE_USERNAME=$DS_USERNAME + export SPRING_DATASOURCE_PASSWORD=$DS_PASSWORD fi export JAVA_OPTS="$JAVA_OPTS -Dserver.port=$SERVER_PORT -Dlogging.file=$LOG_DIR/$SERVICE_NAME.log -XX:HeapDumpPath=$LOG_DIR/HeapDumpOnOutOfMemoryError/" diff --git a/apollo-portal/src/main/scripts/startup.sh b/apollo-portal/src/main/scripts/startup.sh index d8fdca27284..95cb48e10a8 100755 --- a/apollo-portal/src/main/scripts/startup.sh +++ b/apollo-portal/src/main/scripts/startup.sh @@ -16,9 +16,13 @@ mkdir -p $LOG_DIR ########### The following is the same for configservice, adminservice, portal ########### export JAVA_OPTS="$JAVA_OPTS -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+DisableExplicitGC -XX:+ScavengeBeforeFullGC -XX:SoftRefLRUPolicyMSPerMB=0 -XX:+ExplicitGCInvokesConcurrent -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8 -Djava.security.egd=file:/dev/./urandom" +# DS_URL, DS_USERNAME, DS_PASSWORD are deprecated, please use SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME, SPRING_DATASOURCE_PASSWORD instead +# DataSource URL USERNAME PASSWORD if [ "$DS_URL"x != x ] then - export JAVA_OPTS="$JAVA_OPTS -Dspring.datasource.url=$DS_URL -Dspring.datasource.username=$DS_USERNAME -Dspring.datasource.password=$DS_PASSWORD" + export SPRING_DATASOURCE_URL=$DS_URL + export SPRING_DATASOURCE_USERNAME=$DS_USERNAME + export SPRING_DATASOURCE_PASSWORD=$DS_PASSWORD fi export JAVA_OPTS="$JAVA_OPTS -Dserver.port=$SERVER_PORT -Dlogging.file=$LOG_DIR/$SERVICE_NAME.log -XX:HeapDumpPath=$LOG_DIR/HeapDumpOnOutOfMemoryError/"