From 67e83fb3689cda9580b172857e4d0c6117623353 Mon Sep 17 00:00:00 2001 From: ranjunhao Date: Thu, 3 Mar 2022 11:04:35 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9B=86=E6=88=90flyway,=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96MySQL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/stonedt/intelligence/config/DataSourceConfig.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/stonedt/intelligence/config/DataSourceConfig.java b/src/main/java/com/stonedt/intelligence/config/DataSourceConfig.java index dcf3f76..65918cd 100644 --- a/src/main/java/com/stonedt/intelligence/config/DataSourceConfig.java +++ b/src/main/java/com/stonedt/intelligence/config/DataSourceConfig.java @@ -47,7 +47,8 @@ public class DataSourceConfig { String url01 = datasourceUrl.substring(0,datasourceUrl.indexOf("?")); - String url02 = url01.substring(0,url01.lastIndexOf("/"))+"?serverTimezone=Asia/Shanghai"; + String url02 = url01.substring(0,url01.lastIndexOf("/"))+datasourceUrl.substring(datasourceUrl.indexOf("?")); + System.out.println(url02); String datasourceName = url01.substring(url01.lastIndexOf("/")+1); // 连接已经存在的数据库,如:mysql