Merge branch 'develop' into 'main'

Develop

See merge request india/india_market_java!14
This commit is contained in:
rplees
2024-02-16 10:13:14 +00:00

View File

@@ -109,6 +109,8 @@ public class InvestingTask {
/*新闻接口*/
@Scheduled(cron = "0 0 1 * * ?")
public void saveStockNews() {
log.info("英文股票新闻数据同步开始");
try {
String news = stockService.getNews();
List<String> newsList = Arrays.asList(news.split("<a href="));
newsList = newsList.subList(1, newsList.size());
@@ -131,6 +133,10 @@ public class InvestingTask {
newsRepository.save(siteNews);
}
});
log.info("英文股票新闻数据同步完成");
} catch (Exception e) {
log.info("新闻数据同步异常,异常信息{}。。。。",e.getMessage());
}
}
}