From 73a399f4261a653c16710a7bdc3b570265a1d85f Mon Sep 17 00:00:00 2001 From: zhanglong Date: Fri, 28 Jun 2019 21:00:17 +0800 Subject: [PATCH] Refactor application configuration #40 --- README.md | 2 +- build/conf/application.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 15c7cf5..61298f7 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Run the following command: | MYSQL_MASTER_SERVICE_PASSWORD | password of master database | | | MYSQL_SLAVE_SERVICE_HOST | mysql slave host | | | MYSQL_SLAVE_SERVICE_PORT | mysql slave database port | default :3306 | - +| MYSQL_DATABASE_NUM | It indicates the number of database | default :2 | ## Nacos + Grafana + Prometheus Usage reference:[Nacos monitor-guide](https://nacos.io/zh-cn/docs/monitor-guide.html) diff --git a/build/conf/application.properties b/build/conf/application.properties index 162b750..5359046 100644 --- a/build/conf/application.properties +++ b/build/conf/application.properties @@ -7,7 +7,7 @@ nacos.cmdb.dumpTaskInterval=3600 nacos.cmdb.eventTaskInterval=10 nacos.cmdb.labelTaskInterval=300 nacos.cmdb.loadDataAtStart=false -db.num=2 +db.num=${MYSQL_DATABASE_NUM:2} db.url.0=jdbc:mysql://${MYSQL_MASTER_SERVICE_HOST}:${MYSQL_MASTER_SERVICE_PORT:3306}/${MYSQL_MASTER_SERVICE_DB_NAME}?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true db.url.1=jdbc:mysql://${MYSQL_SLAVE_SERVICE_HOST}:${MYSQL_SLAVE_SERVICE_PORT:3306}/${MYSQL_MASTER_SERVICE_DB_NAME}?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true db.user=${MYSQL_MASTER_SERVICE_USER}