I have a Spring App working with websocket
I can do the connection and send messages etc.
The @Controller
is:
@MessageMapping(\
The AbstractMessageBrokerConfiguration
provides this bean:
@Bean
public CompositeMessageConverter brokerMessageConverter() {
You need to inject this bean into your MessageChannelInterceptorAdapter
and call its fromMessage(Message<?> message, Class<?> targetClass)
:
Notification notification = (Notification) this.messageConverter.fromMessage(message, Notification.class);