Spring websocket: how convert easily the Message<?>'s payload to POJO in ChannelInterceptorAdapter
I have a Spring App working with websocket I can do the connection and send messages etc. The @Controller is: @MessageMapping("/ws/notification") @SendTo("/topic/springframework.topic.websocket.reply") public NotificationReply handleNotification(Notification notification) { ... } It works fine. Observe the parameter type, Notification , it is a custom object. Now because audit purposes I have the following: @Component public class MessageChannelInterceptorAdapter extends ChannelInterceptorAdapter { @Override public void postSend(Message<?> message, MessageChannel channel, boolean sent) {