grossopa / weixin-mp-java Goto Github PK
View Code? Open in Web Editor NEW基于Java,Spring,Maven实现的微信公众平台一整套代码,从前端Controller到后端的Dao的实现
License: Apache License 2.0
基于Java,Spring,Maven实现的微信公众平台一整套代码,从前端Controller到后端的Dao的实现
License: Apache License 2.0
感谢您写出完善度这么高的SDK。:)
使用过程中发现一些小问题,我想这个需要提出一下。
按照当前的微信接口规范,发送客服消息的request body格式是
{
"touser": "xxxx_rY0c",
"msgtype": "text",
"text": {
"content": "Hello World"
}
}
目前SendItemTextJson和SendTextJson的属性名反过来(就是text和content)了,应该改成
public class SendTextJson {
private String touser;
private String msgtype;
private SendItemTextJson text;
}
public class SendItemTextJson {
private String content;
}
可以考虑将
String respBody = EntityUtils.toString(entity);
改为
String respBody = EntityUtils.toString(entity, "utf-8");
以回避中文乱码问题(平台约定是utf-8)。
微信官方文档的坑。
它说上传成功时返回 {"type":"TYPE","media_id":"MEDIA_ID","created_at":123456789}
但是对于thumb来说不是这样的,它会返回{"type":"TYPE","thumb_media_id":"MEDIA_ID","created_at":123456789}。
MediaResultMapper应该加入thumb_media_id属性来映射返回的json。
感谢您分享的项目,从中获益匪浅,但还有很多精髓未能理解,请教 WxMessageHandlerIfc是否有实现示例,不是很懂里面的参数意义,期待您的回复,谢谢
all i find is some interfaces which extends spring data interfaces as below:
public interface WxUserDao extends PagingAndSortingRepository<WxUserEntity, Long> {
}
but i don't see any dao implementations.
有没有兴趣一起做一个基于这个框架的微信企业号底层?
其中 itemEle.addElement("HQMusicUrl").addCDATA(item.getUrl());应改成 itemEle.addElement("Url").addCDATA(item.getUrl());
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.