上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: 集合(Map,List)分组:多属性进行分组 一、List 实体字段分组 1. 根据单一字段进行分组: Map<Integer, List<SomeEntity>> detailTypeMap = SomeEntityS.stream().collect(Collectors.groupingBy( 阅读全文
posted @ 2021-09-21 22:21 BGStone 阅读(6617) 评论(0) 推荐(0) 编辑
摘要: 枚举类 举例: 1 import lombok.Getter; 2 3 public class PublicConstants { 4 public enum StatusEnum { 5 6 STATUS_TEMP_STORAGE(1,"暂存", "待提交"), 7 STATUS_AUDI_TI 阅读全文
posted @ 2021-08-25 11:21 BGStone 阅读(488) 评论(0) 推荐(0) 编辑
摘要: 配置文件: 1 import com.fasterxml.jackson.annotation.JsonAutoDetect; 2 import com.fasterxml.jackson.annotation.PropertyAccessor; 3 import com.fasterxml.jac 阅读全文
posted @ 2021-06-29 11:58 BGStone 阅读(1962) 评论(0) 推荐(0) 编辑
摘要: 1. 生成快照: 命令:jmap -dump:format=b,file=yourself_file_name.hprof pid 实例:jmap -dump:format=b,file=2021-06-27-01.hprof 20945 2. 压缩成 zip 文件 命令:zip -r -q des 阅读全文
posted @ 2021-06-28 17:59 BGStone 阅读(57) 评论(0) 推荐(0) 编辑
摘要: 1. 查看指定key 对应的value 的 大小:memory usage key 2. 查看 当前数据库的 key 的数量:dbsize 阅读全文
posted @ 2021-06-28 13:24 BGStone 阅读(24) 评论(0) 推荐(0) 编辑
摘要: mysql 运用锦集 【目录】 调整 字段的顺序: 插入字段到 指定字段 的后面: 添加多个索引 清空表(最彻底的清除,自增起始值也被设置为 0 ) 删除表(如果表存在,不存在,不报错) 清空mysql数据库中所有表的数据 大数据量的数据同步的正确姿势 MYISAM 与 Innodb 的被设置为 a 阅读全文
posted @ 2021-06-16 13:23 BGStone 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 一、引入 Redisson 依赖 <dependency> <groupId>org.redisson</groupId> <artifactId>redisson-spring-boot-starter</artifactId> <version>3.13.2</version> </depend 阅读全文
posted @ 2021-05-25 15:57 BGStone 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 理论都知道,运用中,会无意犯规: (左表达式) && (右表达式) : 操作符,只有在 左表达式为 true 的情况下,才会执行 后面的 右表达式。 错误的写法:【您能发现么】 1 boolean flag = true; 2 for(ConditionBO subjectCondition : s 阅读全文
posted @ 2021-03-15 15:04 BGStone 阅读(138) 评论(0) 推荐(0) 编辑
摘要: String 切割成 List<String> 后,再进行其中元素的移除操作的正确姿势: (1) 按需求 进行切割; (2) 切割所得数组,转成 List 集合; (3) 用将原来的集合的数据,复制一遍到新集合中; (4) 操作 新集合,进行移除。 1 public static void main 阅读全文
posted @ 2021-02-24 22:45 BGStone 阅读(518) 评论(0) 推荐(0) 编辑
摘要: 【解决办法】:将list放入map中,再输出Map 1 Map result = new HashMap(); 2 result.put("result", bussDataList); 3 log.info(JSON.toJSONString(result)); 【结果】: 1 { 2 "resu 阅读全文
posted @ 2021-01-30 16:52 BGStone 阅读(308) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页