对接阿里云短信接口

对接阿里云短信接口


2024年5月19日发(作者:格式化)

service

package e;

import ;

import Response;

import Exception;

import ils;

import ;

import Factory;

import red;

import e;

import ;

@Service

public class SmsService {

static final Logger LOGGER = ger();

@Autowired

private SendUtils sendUtils;

public CommonResponse send(String phone,String code) throws ClientException {

CommonResponse response = (phone,code);

if (response != null && pStatus() == 200){

String data = a();

Map map = bject(data, );

("短信发送状态:{}" + phone + "=====" + code + "=====" + ("Message"));

}

//以下为Api的测试代码,不做理会即可

boolean success = pResponse().isSuccess(); //true

int status = pResponse().getStatus(); //200

int httpStatus = pStatus(); //200

return response;

}

}

SpringMVC

package ller;

import Response;

import Exception;

import vice;

import red;

import ping;

import riable;

import tMapping;

import ntroller;

import ;

/**

*@**************************

* @Description

* @Date 20:09 2019/10/7


发布者:admin,转转请注明出处:http://www.yc00.com/xitong/1716061796a2713899.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信