懒羊羊
2023-11-14 8286c62256f23bc2367a6729c0f46f84215e380b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package cn.stylefeng.guns.modular.WebSocket;
 
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
@RestController
@RequestMapping("/websocket")
public class WebSocketController {
 
 
    @GetMapping("/pushone")
    public void pushone() {
        WebSocketService.sendMessage("badao","公众号:霸道的程序猿");
    }
}