I'm trying to register a WebsocketHandler in a Grails 3.2.x app with the spring-websocket plugin.
I tried creating a custom websocketConfig with the grails create-web-socket-config
command, but the resulting class does not implement org.springframework.web.socket.config.annotation.WebSocketConfigurer
to be able to add handlers to with the registerWebSocketHandlers(WebSocketHandlerRegistry registry)
event.
How would I be able to do this within an AbstractWebSocketMessageBrokerConfigurer
?
within an AbstractWebSocketMessageBrokerConfigurer
, you wont be able to do that.
but you should be able to just supply another @EnableWebSocket
annotated @Configuration
bean implementing WebSocketConfigurer
that is picked up by component scan or you register it manually in resources.groovy
.