liusuyi
2026-06-01 3496700a5ba18be8ca0590a79e21a867782d1ea9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.ard.work.websocket.config;
 
import com.ard.work.websocket.utils.PTZWebSocketUtils;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.Resource;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Component;
 
/**
 * 将 wsPushExecutor 静态注入 PTZWebSocketUtils,启用异步并行广播
 *
 * @author 刘苏义
 */
@Component
public class PTZWebSocketInitializer {
 
    @Resource(name = "wsPushExecutor")
    private ThreadPoolTaskExecutor wsPushExecutor;
 
    @PostConstruct
    public void init() {
        PTZWebSocketUtils.setPushExecutor(wsPushExecutor);
    }
}