摘要: 1.RestTemplate 在项目中,当我们需要远程调用一个 HTTP 接口时,我们经常会用到 RestTemplate 这个类。这个类是 Spring 框架提供的一个工具类。Spring 框架提供的 RestTemplate 类可用于在应用中调用rest服务,它简化了与http服务的通信方式,统 阅读全文
posted @ 2022-04-27 15:02 时间无岸 阅读(2396) 评论(0) 推荐(0)
摘要: 一、引入阿里短信服务的maven依赖 <!--阿里短信服务--> <dependency> <groupId>com.aliyun</groupId> <artifactId>aliyun-java-sdk-core</artifactId> <version>4.4.6</version> </d 阅读全文
posted @ 2020-09-24 11:19 时间无岸 阅读(287) 评论(0) 推荐(0)
摘要: form表单的数据 转json 将form表单中的数据序列化数组后转换为Json 一个jquery的扩展方法(网上摘的): $.fn.serializeObject = function() { var o = {}; var a = this.serializeArray(); $.each(a, 阅读全文
posted @ 2020-09-23 16:12 时间无岸 阅读(767) 评论(0) 推荐(0)
摘要: Restfule风格接口 一、产生背景 网络应用程序,越来越流行前端和后端的分离设计。当前的发展趋势是前端的设计层出不穷。比如:各种型号的手机、平板灯其他设计。因为必须要一种统一的机制方便不同的前端和后端进行通信。这就导致了API结构的流行。其中Restful API是目前比较成熟的一套互联网应用程 阅读全文
posted @ 2020-09-22 22:18 时间无岸 阅读(514) 评论(0) 推荐(0)
摘要: 问题描述:The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "acc 阅读全文
posted @ 2020-09-22 21:11 时间无岸 阅读(2312) 评论(0) 推荐(0)
摘要: 通过反射判断对象的属性是否有非法为空的属性 public class FieldUtil { //传入对象 private static List<String> getNullFields(Object object) { ArrayList<String> list = new ArrayLis 阅读全文
posted @ 2020-09-21 17:43 时间无岸 阅读(180) 评论(0) 推荐(0)
摘要: 一、验证码工具类 (Java Util) 1 import java.awt.*; 2 import java.awt.image.BufferedImage; 3 import java.util.Random; 4 5 /** 6 * @Classname YanZhengUtil 7 * @D 阅读全文
posted @ 2020-09-21 15:04 时间无岸 阅读(244) 评论(0) 推荐(0)