zj
2025-05-06 0a5de93f4212f260ddc65c9317632429e828c7dd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.ruoyi.web.controller.socket;
 
import com.ruoyi.system.service.ISysTgdataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
 
 
@Configuration
public class WebSocketConfig {
 
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }
 
    @Autowired
    public void setTgService(ISysTgdataService service){
        WebSocketServer.tgdataService = service;
    }
 
}