新闻定时任务新增日志信息

This commit is contained in:
dengli
2024-02-16 18:38:07 +08:00
parent 3d59acf8fd
commit 4df20a07a0

View File

@@ -107,11 +107,12 @@ public class InvestingTask {
}
/*新闻接口*/
@Scheduled(cron = "0 0 1 * * ?")
@Scheduled(cron = "0 0 0/3 * * ?")
public void saveStockNews() {
log.info("英文股票新闻数据同步开始");
try {
String news = stockService.getNews();
log.info("获取英文股票新闻数据----"+news);
List<String> newsList = Arrays.asList(news.split("<a href="));
newsList = newsList.subList(1, newsList.size());
newsList.forEach( n -> {