dh address change

master
wenfei 6 months ago
parent 7c501f23b3
commit 7c4a7ca261

@ -53,7 +53,7 @@ public class ScheduledHefengWeatherService {
* //天气图标用法: https://icons.qweather.com/usage/ * //天气图标用法: https://icons.qweather.com/usage/
* @Param: null * @Param: null
*/ */
//@Scheduled(cron = "0 0 2 * * *")//每个小时执行一次 @Scheduled(cron = "0 44 17 * * *")//每个小时执行一次
public void scheduled() { public void scheduled() {
log.info("scheduled"); log.info("scheduled");
log.info("=====>>>>>使用cron:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); log.info("=====>>>>>使用cron:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
@ -125,7 +125,7 @@ public class ScheduledHefengWeatherService {
*/ */
//@Scheduled(cron = "0 0 10,14,18,20,22 * * *")//每天1014182022点各执行一次一天总共执行五次 //@Scheduled(cron = "0 0 10,14,18,20,22 * * *")//每天1014182022点各执行一次一天总共执行五次
//@Scheduled(cron = "0 0 0,8,12,16 * * *")//每天081216点各执行一次一天总共执行四次 //@Scheduled(cron = "0 0 0,8,12,16 * * *")//每天081216点各执行一次一天总共执行四次
@Scheduled(cron = "0 15 * * * *")//每个小时执行一次 //@Scheduled(cron = "0 15 * * * *")//每个小时执行一次
public void scheduledGetRealtimeWeather() { public void scheduledGetRealtimeWeather() {
log.info("scheduledGetRealtimeWeather"); log.info("scheduledGetRealtimeWeather");
log.info("=====>>>>>使用cron:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); log.info("=====>>>>>使用cron:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
@ -141,7 +141,7 @@ public class ScheduledHefengWeatherService {
* @Param: null * @Param: null
*/ */
//@Scheduled(cron = "0 0 9 * * *")//每天9点执行一次 //@Scheduled(cron = "0 0 9 * * *")//每天9点执行一次
@Scheduled(cron = "0 15 * * * *")//每个小时执行一次 //@Scheduled(cron = "0 15 * * * *")//每个小时执行一次
public void scheduledGetForecastWeather() { public void scheduledGetForecastWeather() {
log.info("scheduledGetForecastWeather"); log.info("scheduledGetForecastWeather");
log.info("=====>>>>>使用cron:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); log.info("=====>>>>>使用cron:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));

@ -41,19 +41,19 @@ public class ScheduledZjsltStormService {
* @description: * @description:
* @Param: null * @Param: null
*/ */
// @Scheduled(cron = "0 57 1 * * *") @Scheduled(cron = "0 45 17 * * *")
// public void getZjsltHistoryStormList() { public void getZjsltHistoryStormList() {
// for(int i=1944;i<2026;i++){ for(int i=1944;i<2026;i++){
// getZjsltStormList(String.valueOf(i)); getZjsltStormList(String.valueOf(i));
// } }
// } }
/** /**
* @date 2022-03-16 09:41 * @date 2022-03-16 09:41
* @description: * @description:
* @Param: null * @Param: null
*/ */
@Scheduled(cron = "0 23 * * * *") //@Scheduled(cron = "0 23 * * * *")
public void getZjsltStormList() { public void getZjsltStormList(String nowYear) {
log.info("getZjsltStormList"); log.info("getZjsltStormList");
String strNow = String.valueOf(System.currentTimeMillis()); String strNow = String.valueOf(System.currentTimeMillis());
@ -68,7 +68,7 @@ public class ScheduledZjsltStormService {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
SimpleDateFormat sdfYear = new SimpleDateFormat("yyyy"); SimpleDateFormat sdfYear = new SimpleDateFormat("yyyy");
String nowDate = sdf.format(new Date()); String nowDate = sdf.format(new Date());
String nowYear = sdfYear.format(new Date()); //String nowYear = sdfYear.format(new Date());
Random random = new Random();//以系统自身时间为种子数 Random random = new Random();//以系统自身时间为种子数
int iRandom = random.nextInt(); int iRandom = random.nextInt();

@ -13,7 +13,7 @@ spring:
hikari: hikari:
maximum-pool-size: 4 #数据库线程池最大连接数 maximum-pool-size: 4 #数据库线程池最大连接数
type: com.zaxxer.hikari.HikariDataSource type: com.zaxxer.hikari.HikariDataSource
url: jdbc:postgresql://192.168.3.24:5432/postgres url: jdbc:postgresql://192.168.3.24:5432/weather
driverClassName: org.postgresql.Driver #com.mysql.cj.jdbc.Driver com.mysql.jdbc.Driver driverClassName: org.postgresql.Driver #com.mysql.cj.jdbc.Driver com.mysql.jdbc.Driver
username: postgres username: postgres
password: 452131wW password: 452131wW
@ -41,4 +41,4 @@ spring:
# 最大请求大小 # 最大请求大小
max-request-size: 20MB max-request-size: 20MB
rehome: rehome:
resources-path: /Users/edao/storage # 外部资源文件存储路径 格式:/Users/edao/storage resources-path: /Users/admin/storage # 外部资源文件存储路径 格式:/Users/edao/storage
Loading…
Cancel
Save