Closed better-github-hub closed 1 year ago
Anybody answer me?
I need help , Who can ask me ,how to do ?
I create a new Thread run WebSocketServer, this way can integrate into springboot. like this:
@Bean public WebSocketServer runWebSocketServer(LocalCache cache){ WebSocketServer server = new SimpleWebSocketServer(new InetSocketAddress(host, port),cache); ThreadPoolUtil.getCachedThreadPool().execute(() -> server.run()); return server; }
And, are there any disadvantages to this approach ?
Closing as this is off topic Might be better to ask this in a Spring discussion forum, not here
This is usually how we start:
BUT ,I want to create WebSocketServer bean , and start the application use springboot , as follow: