新闻定时任务新增日志信息
This commit is contained in:
@@ -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 -> {
|
||||
|
||||
Reference in New Issue
Block a user