All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.dengchen2020.message.properties.DcMessageBuilder Maven / Gradle / Ivy

package io.github.dengchen2020.message.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 消息配置
 * @author xiaochen
 * @since 2024/6/4
 */
@ConfigurationProperties(prefix = "dc.message")
public class DcMessageBuilder {

    /**
     * 飞书配置
     */
    private FeiShu feiShu = new FeiShu();

    /**
     * 钉钉配置
     */
    private DingTalk dingTalk = new DingTalk();

    /**
     * 邮件配置
     */
    private Email email = new Email();

    /**
     * 消息发送并发限制个数
     */
    private int concurrencyLimit = 200;

    public int getConcurrencyLimit() {
        return concurrencyLimit;
    }

    public void setConcurrencyLimit(int concurrencyLimit) {
        this.concurrencyLimit = concurrencyLimit;
    }

    public FeiShu getFeiShu() {
        return feiShu;
    }

    public void setFeiShu(FeiShu feiShu) {
        this.feiShu = feiShu;
    }

    public DingTalk getDingTalk() {
        return dingTalk;
    }

    public void setDingTalk(DingTalk dingTalk) {
        this.dingTalk = dingTalk;
    }

    public Email getEmail() {
        return email;
    }

    public void setEmail(Email email) {
        this.email = email;
    }

    public static class FeiShu {

        /**
         * 飞书webhook地址
         */
        private String webhook;

        public String getWebhook() {
            return webhook;
        }

        public void setWebhook(String webhook) {
            this.webhook = webhook;
        }
    }

    public static class DingTalk {

        /**
         * 钉钉webhook地址
         */
        private String webhook;

        public String getWebhook() {
            return webhook;
        }

        public void setWebhook(String webhook) {
            this.webhook = webhook;
        }

    }

    public static class Email {

        /**
         * 邮箱收件人
         */
        private String[] to;

        public String[] getTo() {
            return to;
        }

        public void setTo(String[] to) {
            this.to = to;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy