aliyun-sms-parent

Aliyun SMS project parent

License

License

GroupId

GroupId

com.pig4cloud.plugin
ArtifactId

ArtifactId

aliyun-sms-parent
Last Version

Last Version

1.3.0
Release Date

Release Date

Type

Type

pom
Description

Description

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

How to add to project

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

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • aliyun-sms-core
  • aliyun-sms-spring-boot-starter

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