1、新建钉钉机器人
2、下载Java包
https://ding-doc.dingtalk.com/doc#/faquestions/vzbp02
3、Java工程
public class Dingtest {
public static void main(String[] args){
try{
DingTalkClient client =new DefaultDingTalkClient("https://oapi.dingtalk.com/robot/send?access_token=3a1xxxxxxx");
OapiRobotSendRequest request=new OapiRobotSendRequest();
request.setMsgtype("test");
OapiRobotSendRequest.Text test =new OapiRobotSendRequest.Text();
test .setContent("试试测试文本消息java发送");
request.setText(test);
OapiRobotSendRequest.At at=new OapiRobotSendRequest.At();
at.setAtMobiles(Arrays.asList("15001333166"));
request.setAt(at);
request.setMs