Skip to content

Commit

Permalink
add Notes with web socket
Browse files Browse the repository at this point in the history
  • Loading branch information
527515025 committed Jun 22, 2017
1 parent 3ce8420 commit ad93633
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ public void handleChat(Principal principal, Message message) {
messagingTemplate.convertAndSendToUser("abel",
"/queue/notifications", principal.getName() + "-send:"
+ message.getName());
/**
* 72 行操作相等于
* messagingTemplate.convertAndSend("/user/abel/queue/notifications",principal.getName() + "-send:"
+ message.getName());
*/
} else {
messagingTemplate.convertAndSendToUser("admin",
"/queue/notifications", principal.getName() + "-send:"
Expand Down

0 comments on commit ad93633

Please sign in to comment.