mirror of
https://gitee.com/dromara/dbswitch.git
synced 2025-09-21 19:44:49 +00:00
添加环境变量 MYSQLDB_NAME 的支持
This commit is contained in:
@@ -12,7 +12,7 @@ spring:
|
||||
static-path-pattern: /statics/**
|
||||
datasource:
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
url: jdbc:mysql://${MYSQLDB_HOST:dbswitch_mysqldb}:${MYSQLDB_PORT:3306}/dbswitch?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=UTF8&autoReconnect=true&useSSL=false&allowMultiQueries=true&failOverReadOnly=false&connectTimeout=30000
|
||||
url: jdbc:mysql://${MYSQLDB_HOST:dbswitch_mysqldb}:${MYSQLDB_PORT:3306}/${MYSQLDB_NAME:dbswitch}?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=UTF8&autoReconnect=true&useSSL=false&allowMultiQueries=true&failOverReadOnly=false&connectTimeout=30000
|
||||
username: ${MYSQLDB_USERNAME:tangyibo}
|
||||
password: ${MYSQLDB_PASSWORD:123456}
|
||||
validation-query: SELECT 1
|
||||
@@ -32,4 +32,4 @@ mybatis:
|
||||
|
||||
dbswitch:
|
||||
configuration:
|
||||
drivers-base-path: ${APP_DRIVERS_PATH}
|
||||
drivers-base-path: ${APP_DRIVERS_PATH}
|
||||
|
@@ -1,4 +1,3 @@
|
||||
version: '3.3'
|
||||
services:
|
||||
mysqldb:
|
||||
container_name: dbswitch_mysqldb
|
||||
@@ -25,6 +24,7 @@ services:
|
||||
MYSQLDB_PORT: 3306
|
||||
MYSQLDB_USERNAME: tangyibo
|
||||
MYSQLDB_PASSWORD: 123456
|
||||
MYSQLDB_NAME: dbswitch
|
||||
volumes:
|
||||
- /tmp:/tmp
|
||||
ports:
|
||||
@@ -32,4 +32,3 @@ services:
|
||||
depends_on:
|
||||
mysqldb:
|
||||
condition: service_healthy
|
||||
|
||||
|
Reference in New Issue
Block a user