项目作者: ameizi

项目描述 :
SpringBoot整合weixin-java-tools实现微信公众号登录授权
高级语言: Java
项目地址: git://github.com/ameizi/springboot-weixin-mp.git
创建时间: 2019-04-30T13:17:31Z
项目社区:https://github.com/ameizi/springboot-weixin-mp

开源协议:

下载


springboot-weixin-mp

SpringBoot整合weixin-java-tools实现微信公众号登录授权

注册 https://ngrok.com 将本地服务端口代理映射到公网,微信服务器端绑定映射到ngrok的域名进行调试

  1. wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-windows-amd64.zip
  2. unzip ngrok-stable-windows-amd64.zip
  3. ngrok authtoken 8TAZn4p5inht6MUKtkPzJ_6Amr8yEUYu6ZBndQ2CCKS
  4. ngrok http 8080
  5. ngrok by @inconshreveable (Ctrl+C to quit)
  6. Session Status online
  7. Account 冯靖 (Plan: Free) Fo
  8. rsion 2.3.27 Re
  9. gion United States (us) We
  10. b Interface http://127.0.0.1:4040
  11. Forwarding http://441aca54.ngrok.io -> http://localhost:8080
  12. Forwarding https://441aca54.ngrok.io -> http://localhost:8080
  13. Connections ttl opn rt1 rt5 p50 p90
  14. 0 0 0.00 0.00 0.00 0.00

启动项目,将本地8080代理到441aca54.ngrok.io的80端口,在微信服务器端设置该域名后访问https://441aca54.ngrok.io/wechat/authorize?returnUrl=http://baidu.com即可获取微信用户信息

参考项目

https://github.com/wechat-group/WxJava

https://github.com/binarywang/weixin-java-mp-demo-springboot