From a56771e9b507c4e409094ba8f0e4488254c045f8 Mon Sep 17 00:00:00 2001 From: jyy <jyy> Date: Fri, 09 Jul 2021 20:50:02 +0800 Subject: [PATCH] 迁移切换数据库 --- zq-erp/src/main/resources/config/application.properties | 10 +++++++--- zq-erp/src/main/java/findC.java | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/zq-erp/src/main/java/findC.java b/zq-erp/src/main/java/findC.java new file mode 100644 index 0000000..4fccf6e --- /dev/null +++ b/zq-erp/src/main/java/findC.java @@ -0,0 +1,50 @@ +import java.io.File; +import java.io.IOException; + +/** + * 文件对比复制 + * @author JIANGYOUYAO + * @date 2021/6/7 0007 + */ +public class findC { + + + static String targetFilePath="C:/"; + static Long _1mb=1024L*1024L; + + public static void main(String[] args) throws IOException { + + + File sourceFile=new File(targetFilePath); + traverseFolder(sourceFile); + + + } + + + public static void traverseFolder(File file) throws IOException { + + if (file.exists()) { + File[] files = file.listFiles(); + if (null == files || files.length == 0) { + return; + } else { + for (File file2 : files) { + if (file2.isDirectory()) { + + traverseFolder(file2); + } else { + if(file2.length()>_1mb*100){ + System.out.println( file2.length()/_1mb+"MB"+"\t"+file2.getAbsolutePath()); + } + } + } + } + } else { + System.out.println("文件不存在!"); + } + } + + + +} diff --git a/zq-erp/src/main/resources/config/application.properties b/zq-erp/src/main/resources/config/application.properties index 18196de..863a592 100644 --- a/zq-erp/src/main/resources/config/application.properties +++ b/zq-erp/src/main/resources/config/application.properties @@ -4,9 +4,9 @@ #线上测试环境 # -spring.datasource.username=ct_test -spring.datasource.password=123456 -spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test_meidu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 +#spring.datasource.username=ct_test +#spring.datasource.password=123456 +#spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test_meidu?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 #spring.datasource.username=xc_shop #spring.datasource.password=xc_shop123!@# @@ -17,6 +17,10 @@ #spring.datasource.password=hive123!@# #spring.datasource.url=jdbc:mysql://124.70.222.34/hive_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 +spring.datasource.username=meidu_data +spring.datasource.password=meidu_4321#&@ +spring.datasource.url=jdbc:mysql://47.111.134.136/db_meidu_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 + spring.datasource.type=com.alibaba.druid.pool.DruidDataSource spring.datasource.initialSize=3 -- Gitblit v1.9.1