Ejemplo n.º 1
0
 @Override
 public AbstractResponse onTextMessage(TextRequest text) throws WeixinException {
   // 回复文本消息,除此以外,还可以以回复语音、图片、新闻等等
   String help = controller.findHelp("接收到文本消息");
   help = help.replaceFirst("%str%", text.Content);
   help = help.replaceFirst("%length%", String.valueOf(text.Content.length()));
   return buildTextResponse(help);
 }