-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
MP_demo代码
Binary(班纳睿) edited this page Oct 25, 2016
·
10 revisions
目前有两个demo项目代码可以参考:
- https://github.com/wechat-group/weixin-mp-demo
- https://github.com/wechat-group/weixin-java-tools-springmvc
也可以运行本项目的demo代码来对weixin-java-tools
的有一个更好的了解。
相关代码在:
WxMpDemoServer
WxMpDemoServlet
启动方式:
-
直接运行
WxMpDemoServer
-
将
test-config.sample.xml
改成test-config.xml
,并配置相关信息 -
运行
ngrok 8080
(ngrok是一个让外网访问本机的工具)运行
ngrok
后会出现类似下面的信息:Tunnel Status online Version 1.7/1.6 Forwarding http://1bf992b1.ngrok.com -> 127.0.0.1:8080 Forwarding https://1bf992b1.ngrok.com -> 127.0.0.1:8080 Web Interface 127.0.0.1:4040 # Conn 52 Avg Conn Time 97.88ms
-
将这个地址改为的公众号的服务器地址,然后就可以调试运行了。