aliyun-sms

Aliyun SMS

License

License

GroupId

GroupId

com.pig4cloud.plugin
ArtifactId

ArtifactId

aliyun-sms-core
Last Version

Last Version

1.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

aliyun-sms
Aliyun SMS
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-core

How to add to project

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

Dependencies

compile (2)

Group / Artifact Type Version
com.aliyun : aliyun-java-sdk-core jar 4.5.0
org.slf4j : jcl-over-slf4j jar

provided (1)

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

test (1)

Group / Artifact Type Version
junit : junit 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