项目完善,全自动获取腾讯体育NBA比赛直播源
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.ping.study.controller.tx;
|
||||
|
||||
import com.ping.study.service.tx.LiveInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@@ -10,6 +11,7 @@ import reactor.core.publisher.Mono;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/tx/nba")
|
||||
@Slf4j
|
||||
public class LiveInfoController {
|
||||
|
||||
private final LiveInfoService liveInfoService;
|
||||
@@ -19,7 +21,7 @@ public class LiveInfoController {
|
||||
}
|
||||
|
||||
@GetMapping("/live/{cnlid}")
|
||||
public String getLiveInfo(@PathVariable String cnlid) {
|
||||
public String getLiveInfo(@PathVariable String cnlid) throws Exception {
|
||||
return liveInfoService.getLiveInfo(cnlid);
|
||||
}
|
||||
|
||||
@@ -27,7 +29,8 @@ public class LiveInfoController {
|
||||
//定时任务 从北京时间凌晨到12点,每过半个小时执行一次
|
||||
@Scheduled(cron = "0 0/30 0-11 * * ?")
|
||||
@RequestMapping("/live/refresh")
|
||||
public String refreshLiveInfo() {
|
||||
public String refreshLiveInfo() throws Exception {
|
||||
log.info("=========开始执行更新直播链接=========");
|
||||
return liveInfoService.refreshLiveInfo();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user