1 Star 0 Fork 0

Turbolisten / smart-ding-talk

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README

smart-ding-talk

一款精简的发送钉钉机器人消息的工具

maven依赖:


        <dependency>
            <groupId>net.1024lab</groupId>
            <artifactId>smart-ding-talk</artifactId>
            <version>1.0.0-SNAPSHOT</version>
        </dependency>

钉钉群自定义机器人消息推送示例:

spring-boot :


@Configuration
public class SmartDingTalkConfig {

    @Bean
    public DingTalkRobotNotify createDingTalkRobotNotify() {
        DingTalkRobotNotify robotNotify = DingTalkRobotNotifyBuilder.custom()
            // 如果需要自定义HttpClient 可以手动指定, 否则不需要
            .setHttpClient()
            // 钉钉机器人 access token
            .setRobotAccessToken("xxxxx")
            // 设置 secret
            .setSecret("xxxx")
            .build();
        return robotNotify;
    }
}

机器人消息推送示例:


    @Autowired
    private DingTalkRobotNotify dingTalkRobotNotify;
    
    public void test() {
        DingTalkRobotMsgMarkdown msg = new DingTalkRobotMsgMarkdown();
        msg.setTitle("test title");
        msg.setText("the little yellow flower is floating in the air since the day of my birth");
        dingTalkRobotNotify.sendNotify(msg);
    }

目前支持的机器人消息格式:

格式 class
markdown DingTalkRobotMsgMarkdown
text DingTalkRobotMsgText

Empty file

About

一款精简的发送钉钉机器人消息的工具 expand collapse
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
Java
1
https://gitee.com/listen1015/smart-ding-talk.git
git@gitee.com:listen1015/smart-ding-talk.git
listen1015
smart-ding-talk
smart-ding-talk
develop

Search