aliyun-sms-spring-boot-starter

Aliyun SMS spring boot starter

License

License

Categories

Categories

Spring Boot Container Microservices
GroupId

GroupId

com.pig4cloud.plugin
ArtifactId

ArtifactId

aliyun-sms-spring-boot-starter
Last Version

Last Version

1.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

aliyun-sms-spring-boot-starter
Aliyun SMS spring boot starter
Project URL

Project URL

https://github.com/cn-src/aliyun-sms
Source Code Management

Source Code Management

https://github.com/cn-src/aliyun-sms.git

Download aliyun-sms-spring-boot-starter

How to add to project

<!-- https://jarcasting.com/artifacts/com.pig4cloud.plugin/aliyun-sms-spring-boot-starter/ -->
<dependency>
    <groupId>com.pig4cloud.plugin</groupId>
    <artifactId>aliyun-sms-spring-boot-starter</artifactId>
    <version>1.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.pig4cloud.plugin/aliyun-sms-spring-boot-starter/
implementation 'com.pig4cloud.plugin:aliyun-sms-spring-boot-starter:1.3.0'
// https://jarcasting.com/artifacts/com.pig4cloud.plugin/aliyun-sms-spring-boot-starter/
implementation ("com.pig4cloud.plugin:aliyun-sms-spring-boot-starter:1.3.0")
'com.pig4cloud.plugin:aliyun-sms-spring-boot-starter:jar:1.3.0'
<dependency org="com.pig4cloud.plugin" name="aliyun-sms-spring-boot-starter" rev="1.3.0">
  <artifact name="aliyun-sms-spring-boot-starter" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.pig4cloud.plugin', module='aliyun-sms-spring-boot-starter', version='1.3.0')
)
libraryDependencies += "com.pig4cloud.plugin" % "aliyun-sms-spring-boot-starter" % "1.3.0"
[com.pig4cloud.plugin/aliyun-sms-spring-boot-starter "1.3.0"]

Dependencies

compile (3)

Group / Artifact Type Version
com.pig4cloud.plugin : aliyun-sms-core jar 1.3.0
org.springframework.boot : spring-boot-starter Optional jar
org.springframework.boot : spring-boot-configuration-processor Optional jar

provided (1)

Group / Artifact Type Version
org.projectlombok : lombok Optional jar

test (1)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-test jar

Project Modules

There are no modules declared in this project.

License Maven Central Build Status

aliyun-sms

阿里云 SMS 短信 Java SDK 封装

Github & Issues: https://github.com/cn-src/aliyun-sms

使用

  1. 添加依赖
<dependency>
    <groupId>cn.javaer.aliyun</groupId>
    <artifactId>aliyun-sms</artifactId>
    <version>1.2.0</version>
</dependency>
  1. 样例
SmsClient smsClient = new SmsClient(accessKeyId, accessKeySecret);
SmsTemplate smsTemplate = SmsTemplate.builder()
            .signName(signName)
            .templateCode(templateCode)
            .addTemplateParam("code", "123456")
            .phoneNumbers(phoneNumber)
            .build();
smsClient.send(smsTemplate);            

spring boot 集成

  1. 添加依赖
<dependency>
    <groupId>cn.javaer.aliyun</groupId>
    <artifactId>aliyun-spring-boot-starter-sms</artifactId>
    <version>1.2.0</version>
</dependency>
  1. 配置
aliyun.sms.accessKeyId=
aliyun.sms.accessKeySecret=
aliyun.sms.signName=
aliyun.sms.templates.key1.templateCode=
  1. 样例
    @Autowired
    private SmsClient smsClient;

官方文档:https://help.aliyun.com/document_detail/55284.html?spm=5176.8195934.1001856.3.5cd64183fNqodO

Versions

Version
1.3.0
1.2.1