当前位置: 首页 > news >正文

做招聘海报的网站如何做外贸网站优化推广

做招聘海报的网站,如何做外贸网站优化推广,班级网页网站建设,建立机制目录 🍋发送验证码🧣短信服务(推荐)🐳注册购买🏓代码测试 🖐Java组件封装🥝发送实例🥝pom依赖🌈Spring.factories(略) 🍎麻烦给博主点个关注收藏点…

目录

    • 🍋发送验证码
      • 🧣短信服务(推荐)
        • 🐳注册购买
        • 🏓代码测试
      • 🖐Java组件封装
        • 🥝发送实例
        • 🥝pom依赖
        • 🌈Spring.factories(略)
    • 🍎麻烦给博主点个关注+收藏+点赞!

🍋发送验证码

短信发送是电信运营商提供的服务,需要访问对应的接口,不同运营商提供的接口地址肯定不一样,如果直接访问这些接口就需要判断收信息的手机号属于哪个运营商,关键在于这些接口不对个人开放,还要考虑调用短信服务的费用问题
在这里插入图片描述

因此目前调用短信业务都是使用第三方企业的短信服务,他们与运营商合作,封装了短信接口,调用方法,而且费用相对便宜
在这里插入图片描述

第三方的短信服务有很多,其中阿里云也提供了短信服务

🧣短信服务(推荐)

🐳注册购买

第一步:阿里云首页搜索短信服务

地址:添加链接描述
在这里插入图片描述

在这里插入图片描述

第二步:选择购买的短信服务
在这里插入图片描述

第三步:点击购买,有5条免费使用,测试也会消耗使用次数,用完了在付费购买即可
在这里插入图片描述

第四步:找到自己购买的云服务

在这里插入图片描述

  • 可以看到已购买的服务剩余数量

在这里插入图片描述

🏓代码测试

第一步:参考API,在【API接口】中已经给出了Java代码怎么调用该服务的接口

第二步:参考API,编写发送短信工具类

import com.aliyun.tea.TeaModel;/**** @Title:* @ClassName: com.hssmart.common.utils.AliyunSms.java* @Description:** @Copyright  suihao- Powered By 研发中心* @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管理
在这里插入图片描述
第二部进行查看所需要的accessKeyId 以及accessKeySecret
在这里插入图片描述

🖐Java组件封装

🥝发送实例
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("测试手机号").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(略)

🍎麻烦给博主点个关注+收藏+点赞!

http://www.15wanjia.com/news/177044.html

相关文章:

  • 营销网站建设合同企业网站建设技巧
  • 四川电脑网站建设云南建设监理协会网站
  • 网站设计需要学什么软件长沙市网站推广哪家专业
  • 如何制作wap网站flex布局做自适应网站
  • 阿里云服务器创建网站wordpress开发商
  • 杭州西湖区抖音seo方案新建网站怎么优化
  • 哪里网站书最全培训机构网站制作
  • 网站建设问卷做网站有哪些费用
  • 下载个网上销售网站昆明网站建设猫咪科技
  • 企业建站模板多少钱商城版网站建设
  • 海宁高端高端网站设计网站地区分站系统
  • 免费网站建设服务电影网站建设目的
  • 东莞专业全网推广建站公司自己制作动漫的软件
  • dw网站设计作品wordpress vantage premium
  • 淄博网站优化服务信息查询系统
  • 设计师网站有哪些销售定制家具兰州网站建设科技公司
  • 怎样联系自己建设网站微信怎么弄自己的小程序
  • 宁夏建设工程造价网站电子游戏十大正规官方网址
  • 网站seo推广软件网站通cms
  • 做搜狗网站排名软管理咨询的主体包括哪些
  • 河南开封网站建设西安网站设计建设公司 交通
  • 域名注册后怎么建设网站旅游网站色彩搭配
  • 无水印做海报的网站网站推广服务外包
  • 最好建网站系统的软件在本地搭建wordpress
  • 高性能网站开发500亿网站建设
  • 公司开发网站流程wordpress虚拟主机安装
  • 佛山移动网站建设公司wordpress最新中文版下载
  • 国外有哪些设计网站导购网站怎么做的
  • 做美食网站的目的中华网军事
  • 网络实施方案大连网站优化多少钱