|
@ -21,7 +21,7 @@ import java.util.Date; |
|
|
public class DcMYSQLJob { |
|
|
public class DcMYSQLJob { |
|
|
//private final Environment environment;
|
|
|
//private final Environment environment;
|
|
|
|
|
|
|
|
|
private static final String IP = "10.0.81.202"; |
|
|
private static final String IP = "10.0.111.11"; |
|
|
|
|
|
|
|
|
private static final String PORT = "3306"; |
|
|
private static final String PORT = "3306"; |
|
|
|
|
|
|
|
@ -36,7 +36,7 @@ public class DcMYSQLJob { |
|
|
@Scheduled(cron = "0 0 22 * * ?") |
|
|
@Scheduled(cron = "0 0 22 * * ?") |
|
|
//@Scheduled(cron = "0 10 * * * ?")
|
|
|
//@Scheduled(cron = "0 10 * * * ?")
|
|
|
public void backupAthena() throws IOException { |
|
|
public void backupAthena() throws IOException { |
|
|
String url = "jdbc:mysql://10.0.81.202:3306/athena?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true"; |
|
|
String url = "jdbc:mysql://10.0.111.11:3306/athena?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true"; |
|
|
|
|
|
|
|
|
extracted(url, "athena"); |
|
|
extracted(url, "athena"); |
|
|
} |
|
|
} |
|
@ -45,7 +45,7 @@ public class DcMYSQLJob { |
|
|
//@Scheduled(cron = "0 20 * * * ?")
|
|
|
//@Scheduled(cron = "0 20 * * * ?")
|
|
|
public void backupJiHeDC() throws IOException { |
|
|
public void backupJiHeDC() throws IOException { |
|
|
// 数据库配置信息
|
|
|
// 数据库配置信息
|
|
|
String url = "jdbc:mysql://10.0.81.202:3306/jihe-dc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true"; |
|
|
String url = "jdbc:mysql://10.0.111.11:3306/jihe-dc?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true"; |
|
|
|
|
|
|
|
|
extracted(url, "jihe-dc"); |
|
|
extracted(url, "jihe-dc"); |
|
|
} |
|
|
} |
|
@ -54,7 +54,7 @@ public class DcMYSQLJob { |
|
|
//@Scheduled(cron = "0 30 * * * ?")
|
|
|
//@Scheduled(cron = "0 30 * * * ?")
|
|
|
public void backupJiHeDCPro() throws IOException { |
|
|
public void backupJiHeDCPro() throws IOException { |
|
|
// 数据库配置信息
|
|
|
// 数据库配置信息
|
|
|
String url = "jdbc:mysql://10.0.81.202:3306/jihe-dc-pro?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true"; |
|
|
String url = "jdbc:mysql://10.0.111.11:3306/jihe-dc-pro?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true"; |
|
|
|
|
|
|
|
|
extracted(url, "jihe-dc-pro"); |
|
|
extracted(url, "jihe-dc-pro"); |
|
|
} |
|
|
} |
|
|