add 加了个打印测试数据入口
This commit is contained in:
parent
313f8ac914
commit
23861a897f
@ -1,17 +1,26 @@
|
|||||||
package com.yutou.bilibili.Controllers;
|
package com.yutou.bilibili.Controllers;
|
||||||
|
|
||||||
|
import com.yutou.bilibili.services.LiveDanmuService;
|
||||||
|
import com.yutou.bilibili.services.LiveDatabasesService;
|
||||||
|
import com.yutou.bilibili.services.LiveVideoDownloadService;
|
||||||
import com.yutou.common.okhttp.HttpLoggingInterceptor;
|
import com.yutou.common.okhttp.HttpLoggingInterceptor;
|
||||||
import com.yutou.common.utils.FFmpegUtils;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class TestControllers {
|
public class TestControllers {
|
||||||
@RequestMapping("/root/all")
|
@Resource
|
||||||
|
LiveDatabasesService databasesService;
|
||||||
|
@Resource
|
||||||
|
LiveDanmuService danmuService;
|
||||||
|
@Resource
|
||||||
|
LiveVideoDownloadService videoDownloadService;
|
||||||
|
@RequestMapping("/test/database")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public String test(){
|
public String test(){
|
||||||
return "hello world";
|
return "缓存:"+databasesService.getCacheInfo()+", 弹幕数:"+danmuService.getLiveRoomList().size()+", 视频数:"+videoDownloadService.getDownloadTasks().size();
|
||||||
}
|
}
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping("/root/log")
|
@RequestMapping("/root/log")
|
||||||
|
@ -10,8 +10,7 @@ import lombok.Getter;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.Arrays;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
@ -34,6 +33,9 @@ public class LiveDatabasesService {
|
|||||||
private LiveDatabasesService() {
|
private LiveDatabasesService() {
|
||||||
configDatabase = new BiliLiveConfigDatabase();
|
configDatabase = new BiliLiveConfigDatabase();
|
||||||
}
|
}
|
||||||
|
public String getCacheInfo() {
|
||||||
|
return "总数:"+liveDatabases.size()+","+ Arrays.toString(liveDatabases.asMap().keySet().toArray());
|
||||||
|
}
|
||||||
|
|
||||||
public BiliLiveDatabase getLiveDatabase(String roomId) {
|
public BiliLiveDatabase getLiveDatabase(String roomId) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user