1. 登录企业微信pc版 ,打开群聊,右上方三个点,添加群机器人
2. 复制机器人的webhook地址
3. Java代码实现机器人发送群消息
public static void main(String[] args){
//该机器人特有的webhookurl
String url = "https://xxxxxx";
//参数
Map<String,Object> map = new HashMap<>();
map.put("msgtype","text");
Map<String,Object> map2 = new HashMap<>();
map2.put("content","广州今日天气:29度,大部分多云,降雨概率:60%");
map.put("text",map2);
String jsonString = JSON.toJSONString(map);
String result = HttpRequest.post(url)
// .hea