摘要: 获取restTemplate对象 封装请求头 封装请求参数 发起请求 获取返回值 获取restTemplate对象 1 RestTemplate restTemplate=new RestTemplate(); 封装请求头 HttpHeaders requestHeaders = new HttpH 阅读全文
posted @ 2020-07-02 16:10 oddPoint 阅读(1245) 评论(0) 推荐(0) 编辑
摘要: 注:版本spring-boot-2.1.0.RELEASE 1.入口main方法 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 阅读全文
posted @ 2021-01-19 17:27 oddPoint 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 注:版本spring-boot-2.1.0.RELEASE 1.入口main方法 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 具体的加载逻辑都在ConfigFileApplicationListener中 阅读全文
posted @ 2021-01-19 16:15 oddPoint 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 1.无参构造 初始化elementData为DEFAULTCAPACITY_EMPTY_ELEMENTDATA,此时的容量为0 public ArrayList() { this.elementData = DEFAULTCAPACITY_EMPTY_ELEMENTDATA; } 2.带有容量的构造 阅读全文
posted @ 2020-11-24 15:44 oddPoint 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 1.默认容量 10 private static final int DEFAULT_CAPACITY = 10; 2.空元素数据 private static final Object[] EMPTY_ELEMENTDATA = {}; 3.默认容量空元素数据 private static fin 阅读全文
posted @ 2020-11-23 10:14 oddPoint 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 图解: 源码: public class ArrayList<E> extends AbstractList<E> implements List<E>, RandomAccess, Cloneable, java.io.Serializable 1 RandomAccess:随机访问 1 publ 阅读全文
posted @ 2020-11-22 14:04 oddPoint 阅读(135) 评论(0) 推荐(0) 编辑
摘要: jQuery的deferred对象的使用可以参考阮一峰的jQuery的deferred对象详解 js模块化开发时用到requirejs加载js,有两个模块A和B,require(A),require(B),B依赖A,B中要使用A中异步从后台加载的数据,想到了jQuery的deferred对象,A中返 阅读全文
posted @ 2020-07-03 10:52 oddPoint 阅读(192) 评论(0) 推荐(0) 编辑
摘要: HttpClient下载文件 import org.springframework.util.FileCopyUtils; import javax.servlet.http.HttpServletResponse; import org.apache.http.client.methods.Clo 阅读全文
posted @ 2020-07-02 16:26 oddPoint 阅读(1323) 评论(0) 推荐(0) 编辑
摘要: 如果注册的点击事件函数只会被执行一次,可以按下面的写, $("#id").on('click',function(){ //....... }) 如果注册的点击事件函数可能会被执行多次,请先取消原先的注册事件,避免多次注册,导致点击之后不符合预期效果. $("#id").off('click').o 阅读全文
posted @ 2020-01-17 14:25 oddPoint 阅读(347) 评论(0) 推荐(0) 编辑
摘要: 更新状态注意事项: 检查要更新的状态是否合法, 检查能否从当前状态更新到要更新的状态 阅读全文
posted @ 2020-01-16 11:26 oddPoint 阅读(188) 评论(0) 推荐(0) 编辑