Created
May 31, 2020 17:51
-
-
Save navichok26/75486c57a7be01d99d10f3c726dc1488 to your computer and use it in GitHub Desktop.
WebSocket Controller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Controller | |
public class ChatController { | |
@MessageMapping("/chat.sendMessage") | |
@SendTo("/topic/public") | |
public ChatMessage sendMessage(@Payload ChatMessage chatMessage) { | |
return chatMessage; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment