1
0
mirror of synced 2025-12-23 18:48:00 +08:00

#281 消息路由器增加对EventKey正则表达式匹配的支持

This commit is contained in:
Binary Wang
2017-07-15 18:05:00 +08:00
committed by Binary Wang
parent 33d5f87229
commit e36d16f2a2
3 changed files with 37 additions and 14 deletions

View File

@@ -39,6 +39,7 @@ public class WxMpMessageRouterTest {
.rule().async(async).msgType(WxConsts.XML_MSG_TEXT).handler(new WxEchoMpMessageHandler(sb, WxConsts.XML_MSG_TEXT)).end()
.rule().async(async).event(WxConsts.EVT_CLICK).handler(new WxEchoMpMessageHandler(sb, WxConsts.EVT_CLICK)).end()
.rule().async(async).eventKey("KEY_1").handler(new WxEchoMpMessageHandler(sb, "KEY_1")).end()
.rule().async(async).eventKeyRegex("KEY_1*").handler(new WxEchoMpMessageHandler(sb, "KEY_123")).end()
.rule().async(async).content("CONTENT_1").handler(new WxEchoMpMessageHandler(sb, "CONTENT_1")).end()
.rule().async(async).rContent(".*bc.*").handler(new WxEchoMpMessageHandler(sb, "abcd")).end()
.rule().async(async).matcher(new WxMpMessageMatcher() {