title: Spring websocket(stomp, sockjs): Controller didn't get whole data
body: <p>I'm changing my app using stomp and sockjs.</p>
  
  <p>But somehow my controller can't get my whole data from client.</p>
  
  <p>This is from my <strong>client</strong> side.</p>
  
  <pre><code>&gt;&gt;&gt; SEND
  destination:/app/hello
  content-length:57
  
  {"type":"greeting","user":"james","to":"","message":"hi"}�
  </code></pre>
  
  <p>with my <strong>controller</strong></p>
  
  <pre><code>@MessageMapping("/hello")
  public void greeting(ChatMessage message, SimpMessageHeaderAccessor headerAccessor) throws Exception{
      logger.debug("&gt;&gt;&gt;[GREETING]\n{}", message.toString());
  
      messagingTemplate.convertAndSend("/topic", message);
  }
  </code></pre>
  
  <p><strong>ChatMessage</strong></p>
  
  <pre><code>public class ChatMessage {
  private String user;
  
  private String to;
  
  private String message;
  
  private String type;
  
  ///
  
  @Override
  public String toString(){
      return String.format("ChatMessage [type=" + getType() + ", username="+ getUsername() +", to=" + getToUser() + ", message=" + getMessage() + "]");
  }
  </code></pre>
  
  <p>}</p>
  
  <p>My controller only get <strong>message</strong> and <strong>type</strong></p>
  
  <p>where is my <strong>user</strong>?</p>
  
  <p><em><code>ChatMessage [type=greeting, username=, to=, message=hi]</code></em></p>
  
  <p>Does anyone know what happens with my code?
  Thx</p>