From 7025b92d2c4839b2cf62e838bb02058c34018fb4 Mon Sep 17 00:00:00 2001 From: Yaser Hsueh Date: Mon, 30 Jan 2023 11:58:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=87=AA=E8=BF=B0=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..877399b --- /dev/null +++ b/README.md @@ -0,0 +1,66 @@ +# 消息通知组件 + +## 如何使用 + +`com.simaek.notify.NotifyConfigManager` + +实现getNotifyConfig(NotifyType notifyType, String id),从数据库或者配置文件读取通知器配置 + + +`com.simaek.notify.template.AbstractTemplateManager` + +实现方法getProperties(NotifyType notifyType, String id),从数据库或者配置文件读取模板配置 + +`com.simaek.notify.AbstractNotifierManager` + +默认实现所有的方法,直接继承,有需要再覆写。 + +## 消息发送 + +需要实现或者覆写的功能全都完成了,直接使用即可,有两种发送方式。 + +1、使用预配置的模板发送信息(适用于定时提醒、验证码等较为常用的信息) + +需要提供两个参数:notifierId,templateId。 + +``` +// 通过配置信息的ID,和通知类型获取通知器 +Notifier