代码控制不了控制台的输出
代码:
if("text".equals(msgType)) {
TextMessage text = new TextMessage();
text.setFromUserName(toUserName);
text.setToUserName(fromUserName);
text.setMsgType("text");
text.setCreateTime(new Date().getTime());
text.setContent("dsfds您发送的消息是:"+content);
message = MessageUtil.textMessageToXml(text);
System.out.println(message);
}
控制台输出:
<xml>
<toUserName>oHaku0QMBjON536CGC6P-guc2tRg</toUserName>
<FromUserName>gh_ea7639192607</FromUserName>
<CreateTime>1575302649277</CreateTime>
<MsgType>text</MsgType>
<Content>(text.setcontent)您发送的消息是 :哈哈哈哈</Content>
</xml>