package cn.van333.mt2ql.wxMessage.config;

import org.java_websocket.client.WebSocketClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author Leo
 * @version 1.0
 * @create 2024/03/11 0011 下午 04:34
 * @description：
 */
//@Component
public class WebSocketInitializer {

    private final WebSocketClient webSocketClient;

    public WebSocketInitializer(WebSocketClient webSocketClient) {
        this.webSocketClient = webSocketClient;
    }

    @PostConstruct
    public void startWebSocketClient() {
        webSocketClient.connect();
    }
}
