Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

业务中有多个短信模板如何设置? #10

Closed
YOHN89 opened this issue Jul 4, 2023 · 2 comments
Closed

业务中有多个短信模板如何设置? #10

YOHN89 opened this issue Jul 4, 2023 · 2 comments

Comments

@YOHN89
Copy link

YOHN89 commented Jul 4, 2023

看文档里面写短信模板设置的时候,时候只能设置一个模板。但是实际业务中往往不止一个短信模板,通常会有多个模板,比如:1发送短信验证码;2,发送未读消息等通知提醒;3,发送礼品卡券;等等。
只能设置一个的话基本上没啥用。

@branchen
Copy link

如果你想在某个环节动态的改变配置中的值,可以随时通过SupplierFactory.getAlibabaConfig()获取阿里云的单例配置对象,并且修改它的值,但是要注意的是, 如果你修改了阿里云配置的值在发送短信前必须至少调用一次SmsFactory.refresh(SupplierType.ALIBABA);方法进行配置刷新。

@branchen
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants