中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

建設(shè)網(wǎng)站免費(fèi)模板百度問答庫

建設(shè)網(wǎng)站免費(fèi)模板,百度問答庫,無錫專業(yè)制作外貿(mào)網(wǎng)站的公司,住宿和餐飲網(wǎng)站建設(shè)的推廣目錄 🍋發(fā)送驗證碼🧣短信服務(wù)(推薦)🐳注冊購買🏓代碼測試 🖐Java組件封裝🥝發(fā)送實例🥝pom依賴🌈Spring.factories(略) 🍎麻煩給博主點個關(guān)注收藏點…

目錄

    • 🍋發(fā)送驗證碼
      • 🧣短信服務(wù)(推薦)
        • 🐳注冊購買
        • 🏓代碼測試
      • 🖐Java組件封裝
        • 🥝發(fā)送實例
        • 🥝pom依賴
        • 🌈Spring.factories(略)
    • 🍎麻煩給博主點個關(guān)注+收藏+點贊!

🍋發(fā)送驗證碼

短信發(fā)送是電信運(yùn)營商提供的服務(wù),需要訪問對應(yīng)的接口,不同運(yùn)營商提供的接口地址肯定不一樣,如果直接訪問這些接口就需要判斷收信息的手機(jī)號屬于哪個運(yùn)營商,關(guān)鍵在于這些接口不對個人開放,還要考慮調(diào)用短信服務(wù)的費(fèi)用問題
在這里插入圖片描述

因此目前調(diào)用短信業(yè)務(wù)都是使用第三方企業(yè)的短信服務(wù),他們與運(yùn)營商合作,封裝了短信接口,調(diào)用方法,而且費(fèi)用相對便宜
在這里插入圖片描述

第三方的短信服務(wù)有很多,其中阿里云也提供了短信服務(wù)

🧣短信服務(wù)(推薦)

🐳注冊購買

第一步:阿里云首頁搜索短信服務(wù)

地址:添加鏈接描述
在這里插入圖片描述

在這里插入圖片描述

第二步:選擇購買的短信服務(wù)
在這里插入圖片描述

第三步:點擊購買,有5條免費(fèi)使用,測試也會消耗使用次數(shù),用完了在付費(fèi)購買即可
在這里插入圖片描述

第四步:找到自己購買的云服務(wù)

在這里插入圖片描述

  • 可以看到已購買的服務(wù)剩余數(shù)量

在這里插入圖片描述

🏓代碼測試

第一步:參考API,在【API接口】中已經(jīng)給出了Java代碼怎么調(diào)用該服務(wù)的接口

第二步:參考API,編寫發(fā)送短信工具類

import com.aliyun.tea.TeaModel;/**** @Title:* @ClassName: com.hssmart.common.utils.AliyunSms.java* @Description:** @Copyright  suihao- Powered By 研發(fā)中心* @author: suihao* @date:  2022-11-01 15:51* @version V1.0*/
public class AliyunSms {/*** 使用AK&SK初始化賬號Client* @param accessKeyId * @param accessKeySecret* @return Client* @throws Exception*/public static com.aliyun.dysmsapi20170525.Client createClient(String accessKeyId, String accessKeySecret) throws Exception {com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config()// 您的 AccessKey ID.setAccessKeyId(accessKeyId)// 您的 AccessKey Secret.setAccessKeySecret(accessKeySecret);// 訪問的域名config.endpoint = "dysmsapi.aliyuncs.com";return new com.aliyun.dysmsapi20170525.Client(config);}}

accessKeyId 以及accessKeySecret查找的方式“:
第一步點擊頭像打開accessKey管理
在這里插入圖片描述
第二部進(jìn)行查看所需要的accessKeyId 以及accessKeySecret
在這里插入圖片描述

🖐Java組件封裝

🥝發(fā)送實例
package com.suihao.autoconfig.properties;public static void main(String[] args) {com.aliyun.dysmsapi20170525.Client client = AliyunSms.createClient("accessKeyId", "accessKeySecret");com.aliyun.dysmsapi20170525.models.SendSmsRequest sendSmsRequest = new com.aliyun.dysmsapi20170525.models.SendSmsRequest().setSignName("簽名名稱").setTemplateCode("模板號碼").setPhoneNumbers("測試手機(jī)號").setTemplateParam("{\"code\":\"6666\"}");com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();com.aliyun.dysmsapi20170525.models.SendSmsResponse resp = client.sendSmsWithOptions(sendSmsRequest, runtime);com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(TeaModel.buildMap(resp)));}

1.SignName代表的簽名名稱
在這里插入圖片描述
2.TemplateCode代表的模板code
在這里插入圖片描述

🥝pom依賴
 <!--阿里云--><developers><developer><id>aliyundeveloper</id><name>Aliyun SDK</name><email>aliyunsdk@aliyun.com</email></developer></developers><distributionManagement><snapshotRepository><id>sonatype-nexus-snapshots</id><url>https://s01.oss.sonatype.org/content/repositories/snapshots</url></snapshotRepository><repository><id>sonatype-nexus-staging</id><url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url></repository></distributionManagement><scm><connection></connection><developerConnection></developerConnection><url></url></scm><dependencies><!--阿里云--><dependency><groupId>com.aliyun</groupId><artifactId>dysmsapi20170525</artifactId><version>2.0.22</version></dependency><dependency><groupId>com.aliyun</groupId><artifactId>tea-openapi</artifactId><version>0.2.6</version></dependency><dependency><groupId>com.aliyun</groupId><artifactId>tea-console</artifactId><version>0.0.1</version></dependency><dependency><groupId>com.aliyun</groupId><artifactId>tea-util</artifactId><version>0.2.14</version></dependency><dependency><groupId>com.aliyun</groupId><artifactId>tea</artifactId><version>1.1.14</version></dependency><!----></dependencies><build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin><plugin><groupId>org.sonatype.plugins</groupId><artifactId>nexus-staging-maven-plugin</artifactId><version>1.6.3</version><extensions>true</extensions><configuration><serverId>sonatype-nexus-staging</serverId><nexusUrl>https://s01.oss.sonatype.org/</nexusUrl><autoReleaseAfterClose>true</autoReleaseAfterClose></configuration></plugin></plugins></build>
🌈Spring.factories(略)

🍎麻煩給博主點個關(guān)注+收藏+點贊!

http://www.risenshineclean.com/news/8840.html

相關(guān)文章:

  • 運(yùn)城鹽湖區(qū)姚孟信通網(wǎng)站開發(fā)中心專業(yè)網(wǎng)站優(yōu)化外包
  • 北京網(wǎng)站建設(shè)模板網(wǎng)絡(luò)優(yōu)化app哪個好
  • 鄭州網(wǎng)站建設(shè)專家百度老年搜索
  • 德惠市建設(shè)局網(wǎng)站seo網(wǎng)絡(luò)營銷推廣排名
  • seo關(guān)鍵詞優(yōu)化培訓(xùn)泉州seo報價
  • 德陽網(wǎng)站建設(shè)平臺百度收錄軟件
  • 專門做稀有產(chǎn)品的網(wǎng)站seo代碼優(yōu)化包括哪些
  • 工作室有專門的網(wǎng)站如何找友情鏈接
  • 有什么國外的黃網(wǎng)站百度服務(wù)中心投訴
  • 課程設(shè)計代做網(wǎng)站推薦優(yōu)化疫情二十條措施
  • 寶雞做網(wǎng)站公司谷歌瀏覽器下載官網(wǎng)
  • 公司網(wǎng)站建設(shè)怎么選擇主機(jī)大小百度推廣個人怎么開戶
  • 太原網(wǎng)站建設(shè)制作報價南寧seo營銷推廣
  • 網(wǎng)站建設(shè)維護(hù)及使用管理辦法自動友鏈網(wǎng)
  • 企業(yè)網(wǎng)站運(yùn)營推廣難做嗎天津seo數(shù)據(jù)監(jiān)控
  • erp系統(tǒng)哪家做得好武漢整站seo數(shù)據(jù)上云
  • 如何做網(wǎng)站呢上海網(wǎng)絡(luò)推廣平臺
  • 蘇州專業(yè)網(wǎng)站建設(shè)定制正規(guī)考證培訓(xùn)機(jī)構(gòu)
  • 在哪里學(xué)做網(wǎng)站網(wǎng)絡(luò)seo優(yōu)化公司
  • 自己可以做開獎網(wǎng)站嗎方象科技服務(wù)案例
  • 重慶做網(wǎng)站微信的公司百度灰色詞排名代發(fā)
  • 做海報的參考網(wǎng)站怎么做線上銷售
  • 用群暉nas做網(wǎng)站營銷策劃經(jīng)典案例
  • 做網(wǎng)站收會員費(fèi)徐州seo
  • 網(wǎng)站注冊協(xié)議怎樣自己做網(wǎng)站
  • 怎樣自建網(wǎng)站網(wǎng)頁優(yōu)化建議
  • 平面設(shè)計海報圖片seo按天計費(fèi)系統(tǒng)
  • 巨鹿網(wǎng)站建設(shè)網(wǎng)絡(luò)公司關(guān)鍵詞查詢工具
  • 安陽做網(wǎng)站的公司流量寶
  • 網(wǎng)站類型分類有哪些電商網(wǎng)站建設(shè) 網(wǎng)站定制開發(fā)