Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

okhttp实现的二维码下载代码有问题 #362

Closed
javadevelopuser opened this issue Nov 2, 2017 · 5 comments
Closed

okhttp实现的二维码下载代码有问题 #362

javadevelopuser opened this issue Nov 2, 2017 · 5 comments
Labels

Comments

@javadevelopuser
Copy link

参考链接样例:https://github.com/Wechat-Group/weixin-java-tools/wiki/MP_%E4%BA%8C%E7%BB%B4%E7%A0%81%E7%AE%A1%E7%90%86
和WxMpQrCodeServiceImplTest测试类进行试运行,不能正常生成二维码图片,而且图片格式和wiki说明也不一致。

@binarywang
Copy link
Owner

那个图片是临时文件,你调用方法后需要自己再保存一份,程序退出后会删除掉的,你也不能指望使用临时文件夹里的文件吧?

@javadevelopuser
Copy link
Author

我有测试移动到其他文件夹,发现复制过去的是一个0大小的文件。

@binarywang
Copy link
Owner

经过测试,发现单元测试目前用的是okhttp的实现,代码有问题,而实际默认使用的apache httpclient 不存在此问题,okhttp的实现稍后修复下。

@javadevelopuser
Copy link
Author

非常感谢!

@binarywang binarywang changed the title 根据对WxMpQrCodeServiceImplTest试运行,发现代码里生成的图片文件格式为png格式,同时在系统临时文件夹中也没有正常生成对应的二维码图片。 okhttp实现的二维码下载代码有问题 Nov 3, 2017
@binarywang binarywang added the bug label Nov 3, 2017
@binarywang
Copy link
Owner

2.8.6.BETA已修复

comeonc added a commit to comeonc/weixin-java-tools that referenced this issue Oct 9, 2018
…nto develop

* 'develop' of github.com:Wechat-Group/weixin-java-tools: (55 commits)
  binarywang#333 修复消息验重问题(mp和cp同时存在的问题)
  修复checkstyle检查出来的部分代码问题
  修改checkstyle配置,以符合IDEA默认的import顺序规则
  重构WxConsts类,对所有常量进行分类整理,便于阅读使用
  规范类命名
  发布临时测试版本2.8.6.BETA
  修复日志
  WxMpTemplateMessage类去掉@NoArgsConstructor注解
  Update .travis.yml
  签名方法里忽略几个自定义key,以免对签名造成干扰
  WxMpTemplateMessage添加默认构造方法
  binarywang#362 修复okhttp实现的qrcode二维码图片下载代码
  binarywang#361 WxMpKefuMessage类的内部类实现序列化接口
  Update readme.md
  优化代码
  发布临时测试版本2.8.5.BETA
  完善修复xmlBean2Map方法
  为兼容之前版本代码,引入两个方法
  修复单元测试
  Update readme.md
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants