摘要: 最近遇到个需求是这样的:写一个类似于通讯录的简单功能,要求是首先按照部门显示列表,然后点击部门下拉显示部门里面的人员信息,且人员信息按照职位排序。先分析数据结构:最外层是部门,部门里面是员工,且项目是统一返回数据格式。{ "code": 0, "data": [ { "name": "部门名称", 阅读全文
posted @ 2020-03-19 18:33 那些年的代码 阅读(11404) 评论(0) 推荐(0) 编辑
摘要: 区别: LinkedHashMap是继承于HashMap,是基于HashMap和双向链表来实现的。 HashMap无序;LinkedHashMap有序,可分为插入顺序和访问顺序两种。如果是访问顺序,那put和get操作已存在的Entry时,都会把Entry移动到双向链表的表尾(其实是先删除再插入)。 阅读全文
posted @ 2020-03-19 18:32 那些年的代码 阅读(306) 评论(0) 推荐(0) 编辑
摘要: Map<String, String> testMap = new HashMap<String, String>();testMap.put("1", "3");testMap.put("3", "4");testMap.put("2", "1");testMap.put("4", "2");fo 阅读全文
posted @ 2020-03-19 17:17 那些年的代码 阅读(6212) 评论(0) 推荐(0) 编辑
摘要: Spring boot之所以流行,是因为Spring starter。Spring starter是Spring boot的核心,可以理解为一个可拔插式的插件,例如,你想使用Reids插件,那么可以使用spring-boot-starter-redis;如果想使用MongoDB,可以使用spring 阅读全文
posted @ 2020-03-19 16:59 那些年的代码 阅读(1083) 评论(0) 推荐(0) 编辑