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

aliyun-sms-spring-boot-starter 模块实现 SmsReportMessageListener 类之后启动报错,无法拉取回执消息。 #79

Open
gyl-coding opened this issue Apr 23, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@gyl-coding
Copy link

报错信息如下
a、一启动就会报如下错误,切换了mns节点也无济于事;
b、发短信正常;
image

1. pom



com.alibaba.cloud
aliyun-spring-boot-dependencies
1.0.0
pom
import


com.alibaba.cloud aliyun-sms-spring-boot-starter

2. yml
alibaba:
cloud:
access-key: LsQ
secret-key: 2
0B
sms:
report-queue-name: Alicom-Queue-1410-SmsReport
up-queue-name: Alicom-Queue-14
10-SmsUp

3. 监听类
/**

  • @author 如果需要监听短信是否被对方成功接收,只需实现这个接口并初始化一个 Spring Bean 即可。
    */
    @slf4j
    @component
    public class SmsReportListener implements com.alibaba.cloud.spring.boot.sms.SmsReportMessageListener {
    private List smsReportMessageSet = new LinkedList<>();
    @OverRide
    public boolean dealMessage(Message message) {
    smsReportMessageSet.add(message);
    log.error(this.getClass().getName() + "; " + message.toString());
    if (message != null) {
    return true;
    }
    return false;
    }
    public List getSmsReportMessageSet() {
    return smsReportMessageSet;
    }
    }
@gyl-coding gyl-coding added the bug Something isn't working label Apr 23, 2023
@gyl-coding
Copy link
Author

pom:
com.alibaba.cloud: aliyun-spring-boot-dependencies:1.0.0
com.alibaba.cloud:aliyun-sms-spring-boot-starter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant