jiazx0107@163.com
2023-09-18 4dc585d5bf2fd0a01602aba0d9fa25adbaf4a7fb
igds-basic/src/main/java/com/ld/igds/timer/WeatherTimerService.java
ÎļþÃû´Ó igds-basic/src/main/java/com/ld/igds/timer/WeatherScheduled.java ÐÞ¸Ä
@@ -24,9 +24,9 @@
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import javax.annotation.Resource;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
@@ -46,7 +46,7 @@
 */
@Slf4j
@Component
public class WeatherScheduled {
public class WeatherTimerService {
    @Resource(name = NotifyWeatherService.BEAN_ID)
    private NotifyWeatherService notifyService;
@@ -74,8 +74,7 @@
    /**
     * å®šæ—¶èŽ·å–æ°”è±¡ä¿¡æ¯ï¼Œè¯·æ³¨æ„ï¼Œç”±äºŽæ°”è±¡æ”¯æŒå¤–ç½‘å’Œè‡ªå®šä¹‰æ°”è±¡ç«™ï¼Œç³»ç»Ÿé»˜è®¤åªæ‰§è¡Œå…¶ä¸­ä¸€ç§æ–¹å¼
     */
    @Scheduled(cron = "0 0/30 * * * ?")
    public void scheduled() {
    public void doExe() {
        log.info("===========================系统定时获获取气象信息======================");
@@ -316,6 +315,7 @@
    /**
     * èŽ·å–èº«ä»½è®¤è¯çš„æŽˆæƒaccessToken
     *
     * @param conf
     * @return
     */
@@ -350,4 +350,5 @@
        return token;
    }
}