You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
package com.rehome.mqttclienttemperature.service;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.google.gson.Gson;
|
|
|
|
|
import com.rehome.mqttclienttemperature.controller.JdbcDemoController;
|
|
|
|
|
import com.rehome.mqttclienttemperature.dto.ResponseDto;
|
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @author huangwenfei
|
|
|
|
|
* @version v1.0.0.0
|
|
|
|
|
* Created DateTime 2021-04-26 14:35
|
|
|
|
|
* @description: 定时任务服务
|
|
|
|
|
*/
|
|
|
|
|
@Component
|
|
|
|
|
public class ScheduledService {
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private JdbcDemoController jdbcDemoController;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @date 2022-03-16 09:41
|
|
|
|
|
*
|
|
|
|
|
* @description: 从中央气象台获取省份列表
|
|
|
|
|
* @Param: null
|
|
|
|
|
*/
|
|
|
|
|
// @Scheduled(cron = "30 31 0 18 12 *")
|
|
|
|
|
public void getNmcWeatherProvince() {
|
|
|
|
|
ResponseDto responseDto = jdbcDemoController.queryList();
|
|
|
|
|
//System.out.println(new Gson().toJson(responseDto));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|