mirror of
https://gitee.com/dromara/dbswitch.git
synced 2025-10-14 05:40:23 +00:00
支持配置文件切换环境
This commit is contained in:
@@ -1,15 +1,4 @@
|
||||
server:
|
||||
port: 9088
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: dbswitch-admin
|
||||
tomcat:
|
||||
uri-encoding: UTF-8
|
||||
max-http-header-size: 8096
|
||||
mvc:
|
||||
throw-exception-if-no-handler-found: false
|
||||
static-path-pattern: /statics/**
|
||||
datasource:
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
url: jdbc:mysql://192.168.31.57:3306/dbswitch?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=UTF8&autoReconnect=true&useSSL=false&allowMultiQueries=true&failOverReadOnly=false&connectTimeout=30000
|
||||
@@ -22,14 +11,3 @@ spring:
|
||||
baseline-on-migrate: true
|
||||
table: DBSWITCH_SCHEMA_HISTORY
|
||||
enabled: true
|
||||
|
||||
mybatis:
|
||||
configuration:
|
||||
lazy-loading-enabled: true
|
||||
aggressive-lazy-loading: false
|
||||
map-underscore-to-camel-case: true
|
||||
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
dbswitch:
|
||||
configuration:
|
||||
drivers-base-path: ${APP_DRIVERS_PATH}
|
13
dbswitch-admin/src/main/resources/application-postgres.yml
Normal file
13
dbswitch-admin/src/main/resources/application-postgres.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: org.postgresql.Driver
|
||||
url: jdbc:postgresql://192.168.31.57:5432/dbswitch?currentSchema=public
|
||||
username: tangyibo
|
||||
password: 123456
|
||||
validation-query: SELECT 1
|
||||
test-on-borrow: true
|
||||
flyway:
|
||||
locations: classpath:db/postgres
|
||||
baseline-on-migrate: true
|
||||
table: dbswitch_schema_history
|
||||
enabled: true
|
@@ -1,7 +1,7 @@
|
||||
server:
|
||||
port: 9088
|
||||
|
||||
spring:
|
||||
profiles:
|
||||
include: mysql
|
||||
#include: postgres
|
||||
application:
|
||||
name: dbswitch-admin
|
||||
tomcat:
|
||||
@@ -10,18 +10,9 @@ spring:
|
||||
mvc:
|
||||
throw-exception-if-no-handler-found: false
|
||||
static-path-pattern: /statics/**
|
||||
datasource:
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
url: jdbc:mysql://192.168.31.57:3306/dbswitch?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=UTF8&autoReconnect=true&useSSL=false&allowMultiQueries=true&failOverReadOnly=false&connectTimeout=30000
|
||||
username: tangyibo
|
||||
password: 123456
|
||||
validation-query: SELECT 1
|
||||
test-on-borrow: true
|
||||
flyway:
|
||||
locations: classpath:db/migration
|
||||
baseline-on-migrate: true
|
||||
table: DBSWITCH_SCHEMA_HISTORY
|
||||
enabled: true
|
||||
|
||||
server:
|
||||
port: 9088
|
||||
|
||||
mybatis:
|
||||
configuration:
|
||||
|
@@ -1,35 +0,0 @@
|
||||
server:
|
||||
port: 9088
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: dbswitch-admin
|
||||
tomcat:
|
||||
uri-encoding: UTF-8
|
||||
max-http-header-size: 8096
|
||||
mvc:
|
||||
throw-exception-if-no-handler-found: false
|
||||
static-path-pattern: /statics/**
|
||||
datasource:
|
||||
driver-class-name: org.postgresql.Driver
|
||||
url: jdbc:postgresql://192.168.31.57:5432/dbswitch?currentSchema=public
|
||||
username: tangyibo
|
||||
password: 123456
|
||||
validation-query: SELECT 1
|
||||
test-on-borrow: true
|
||||
flyway:
|
||||
locations: classpath:db/postgres
|
||||
baseline-on-migrate: true
|
||||
table: dbswitch_schema_history
|
||||
enabled: true
|
||||
|
||||
mybatis:
|
||||
configuration:
|
||||
lazy-loading-enabled: true
|
||||
aggressive-lazy-loading: false
|
||||
map-underscore-to-camel-case: true
|
||||
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
dbswitch:
|
||||
configuration:
|
||||
drivers-base-path: ${APP_DRIVERS_PATH}
|
Reference in New Issue
Block a user