1 Star 0 Fork 43

lijiahui / free-bsf-all

forked from 车江毅 / free-bsf-all 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 1.20 KB
一键复制 编辑 原始数据 按行查看 历史
gavin 提交于 2021-09-22 16:53 . 提交新版本

消息集成说明

介绍

用于短信、邮件、钉钉消息功能集成

依赖引用

<dependency>
	<artifactId>free-bsf-message</artifactId>
	<groupId>com.free.bsf</groupId>
	<version>1.7.1-SNAPSHOT</version>
</dependency>

配置说明

# 消息功能启用
bsf.message.enabled=true
# 钉钉消息功能启用
bsf.message.dingding.enabled=true
# 钉钉发送消息,需要token。项目根据不同需要,设置不同的token
bsf.health.warn.dingding.system.access_token=

# 短信模块,启用
# 短信模块基于HTTP请求发送,可依据具体短信服务扩展
bsf.message.sms.enabled=false
sms.url=
sms.url.bak=
sms.user=
sms.password=
sms.server=

示例代码

短信示例


    @Autowired
    private SmsProvider smsProvider;   
    /**
    *	发送短信
    */
    public void sendMessage(String phone){
    		smsProvider.sendText(phone, "CRM测试短信,收到请忽略!","CRM");    	
    }

钉钉消息示例

	@Autowired
 	DingdingProvider dingdingProvider;
 	/**
    *	发送短信
    */
    public void sendMessage(String phone){
    		dingdingProvider.sendText(phone, "CRM测试短信,收到请忽略!","CRM");    	
    }
Java
1
https://gitee.com/null_357_9907/free-bsf-all.git
git@gitee.com:null_357_9907/free-bsf-all.git
null_357_9907
free-bsf-all
free-bsf-all
master

搜索帮助