https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/Access_Overview.html





https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Passive_user_reply_message.html
@RequestMapping("/test")
public String test(@RequestBody WxParamDto body) {
WxParamDto result = WxParamDto.builder()
.ToUserName(body.getFromUserName())
.FromUserName(body.getToUserName()).Content("你好")
.MsgType("text")
.CreateTime(DateUtil.currentSeconds()).build();
String jsonString = JSONObject.toJSONString(result, JSONWriter.Feature.FieldBased);
return jsonString;
}@Data
@Builder
public class WxParamDto {
private String FromUserName;
private Long CreateTime;
private String MsgType;
private String Content;
private String MsgId;
private String MsgDataId;
private String ToUserName;
}只需要在设置回调地址的时候回复url为以下地址即可
https://ydfm.cc/madmin/other/callback/robot