test

博客园 首页 新随笔 联系 订阅 管理

2023年11月1日 #

摘要: public Long getEventGroupDivceCont(LogRequest req) { String indexName; if (req.getAppId() == null) { indexName = indexNameGenerator.structuredLogPrefi 阅读全文
posted @ 2023-11-01 19:37 testgogogo 阅读(56) 评论(0) 推荐(0) 编辑

2023年10月30日 #

摘要: redis 替换keys方案 @Autowiredprivate RedisTemplate redisTemplate; public Set<String> keyScan(String key) { //批量查询需要统计的数据 Set<String> keys = (Set<String>) 阅读全文
posted @ 2023-10-30 13:27 testgogogo 阅读(97) 评论(0) 推荐(0) 编辑

2023年10月9日 #

摘要: 当使用的model类中需要新增一些字段仅用于程序中传参,而不需要添加到数据库表中时,可以通过添加@Transient注解使mybatis忽略它而不做对应关系。 例如: @Transient private String userConfig;如果是使用的mybatis plus,需要使用 @Tabl 阅读全文
posted @ 2023-10-09 18:27 testgogogo 阅读(34) 评论(0) 推荐(0) 编辑

2023年10月8日 #

摘要: 启动代码 java -server -Xms4g -Xmx4g -Xss256k -XX:NewSize=512m -XX:MaxNewSize=512m -XX:+UseG1GC -XX:InitiatingHeapOccupancyPercent=40 -XX:G1HeapRegionSize= 阅读全文
posted @ 2023-10-08 16:04 testgogogo 阅读(39) 评论(0) 推荐(0) 编辑

2023年9月27日 #

摘要: js 相关简单写法 1、在一个数组对象内查询,查询到判断属性是否为空,为空则设置默认值 const name = arrayJson.find(obj => obj.code val)?.name || '-' 阅读全文
posted @ 2023-09-27 14:06 testgogogo 阅读(2) 评论(0) 推荐(0) 编辑

2023年9月23日 #

摘要: 一、相关依赖 <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> < 阅读全文
posted @ 2023-09-23 11:29 testgogogo 阅读(55) 评论(0) 推荐(0) 编辑

2023年9月14日 #

摘要: 第二种排序法: 倒叙: list.sort((o1, o2) -> o2.get("UTILIZSIZE").toString().compareTo(o1.get("UTILIZSIZE").toString())); 正序: list.sort((o1, o2) -> o1.get("UTILI 阅读全文
posted @ 2023-09-14 14:49 testgogogo 阅读(47) 评论(0) 推荐(0) 编辑

2023年6月30日 #

摘要: 方式 一: ###########################################################配置打印sql######################################################## logging: level: com.t 阅读全文
posted @ 2023-06-30 10:20 testgogogo 阅读(562) 评论(0) 推荐(0) 编辑

2023年5月21日 #

摘要: List<EmEventConfigPointExcelDto> listNew = list.stream() .collect(Collectors.collectingAndThen( Collectors.toCollection(() -> new TreeSet<>(Comparator 阅读全文
posted @ 2023-05-21 15:04 testgogogo 阅读(221) 评论(0) 推荐(0) 编辑

2023年1月29日 #

摘要: /** * @author admin * @Description * 转大写 */ public class HashMapUpper<V> extends HashMap<String, V> { /** * 复写put方法,因为Mybatis底层给Map赋值就是调用的put方法 * * @p 阅读全文
posted @ 2023-01-29 11:25 testgogogo 阅读(117) 评论(0) 推荐(0) 编辑