fix 修复 关闭短信功能 找不到bean异常问题

This commit is contained in:
疯狂的狮子li
2022-05-07 15:10:58 +08:00
parent c40aa1f950
commit ce14b5e9fb
3 changed files with 15 additions and 3 deletions

View File

@ -45,7 +45,6 @@ public class CaptchaController {
private final CaptchaProperties captchaProperties;
private final SmsProperties smsProperties;
private final SmsTemplate smsTemplate;
private final ISysConfigService configService;
/**
@ -66,6 +65,7 @@ public class CaptchaController {
String templateId = "";
Map<String, String> map = new HashMap<>(1);
map.put("code", code);
SmsTemplate smsTemplate = SpringUtils.getBean(SmsTemplate.class);
SmsResult result = smsTemplate.send(phonenumber, templateId, map);
if (!result.isSuccess()) {
log.error("验证码短信发送异常 => {}", result);