Skip to content

Repository files navigation

PCSMS

彭城短信

pcsms v1.0.0

pcsms -- 让发送短信变的更简单

在SpringBoot环境集成

  1. maven引入

    <dependency>
    <groupId>com.luomor.pcsms</groupId>
    <artifactId>pcsms-spring-boot-starter</artifactId>
    <version>1.0.1</version>
    </dependency>
  2. 设置配置文件

    sms:
    config-type: yamlblends:
    tag1:
    accessKeyId: testaccessKeySecret: testsignature: testtemplateId: testtemplateName: coderequestUrl: dysmsapi.aliyuncs.comtag2:
    appKey: testapp-secret: testsignature: 华为短信测试sender: 1template-id: teststatusCallBack:
    url: https://test.cn-north-4.test.com:443
  3. 方法使用

@RestController@RequestMapping("/test/")
publicclassTestController {
@RequestMapping("/")
publicvoidsend() {
SmsFactory.getSmsBlend("tag1").sendMessage("16811116667", "123456");
SmsFactory.getSmsBlend("tag2").sendMessage("16811116667", "000000");
}
}

配置详解

线程池配置

sms:
corePoolSize: 10maxPoolSize: 30queueCapacity: 50keepAliveSeconds: 60threadNamePrefix: sms-executor-shutdownStrategy: true

Releases

Packages

Contributors

Languages