Merge branch 'develop' into 'main'
新闻定时任务新增日志信息 See merge request india/india_market_java!15
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() {
|
public void saveStockNews() {
|
||||||
log.info("英文股票新闻数据同步开始");
|
log.info("英文股票新闻数据同步开始");
|
||||||
try {
|
try {
|
||||||
String news = stockService.getNews();
|
String news = stockService.getNews();
|
||||||
|
log.info("获取英文股票新闻数据----"+news);
|
||||||
List<String> newsList = Arrays.asList(news.split("<a href="));
|
List<String> newsList = Arrays.asList(news.split("<a href="));
|
||||||
newsList = newsList.subList(1, newsList.size());
|
newsList = newsList.subList(1, newsList.size());
|
||||||
newsList.forEach( n -> {
|
newsList.forEach( n -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user