摘要: 完整代码git地址 https://gitee.com/zhaoyuxuan66/pulsar-springcloud_boot-demo/tree/master/ 代码,包括Pulsar的参数类, Pulsar Client, Producer和Consumer Pulsar参数类 @Data@C 阅读全文
posted @ 2021-11-19 18:40 却道。此心安处是吾乡 阅读(956) 评论(0) 推荐(0) 编辑
摘要: @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")@Value("${dateValue:2023-11-01 00:00:00}")private Date noWxMomentsEnableDateStr; 阅读全文
posted @ 2023-11-03 15:30 却道。此心安处是吾乡 阅读(160) 评论(0) 推荐(0) 编辑
摘要: package cn.yto.stl.freight.web.api.common.aspect;import cn.yto.base.exception.IException;import cn.yto.stl.freight.web.api.common.domain.DataResult;im 阅读全文
posted @ 2022-08-24 14:47 却道。此心安处是吾乡 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 在此步时做到 向容器手动注入Bean 实现 BeanDefinitionRegistryPostProcessor 接口 1.重写方法: public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) 2. 阅读全文
posted @ 2022-08-23 19:47 却道。此心安处是吾乡 阅读(250) 评论(0) 推荐(0) 编辑
摘要: 之前写的代码 偷学公司大佬代码之后 学会了一种优雅的方式 阅读全文
posted @ 2022-08-23 10:10 却道。此心安处是吾乡 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 持久化PartitionedTopic 创建流程: 校验(topic名称,权限,NameSpace上限)->检查Topic是否存在->在ZK中写入Topic元数据->创建Ledger信息,其中记录这个分区都写在哪个Bookie节点上->Topic信息缓存在Broker中 其余类型Topic创建流程基 阅读全文
posted @ 2022-06-20 14:57 却道。此心安处是吾乡 阅读(426) 评论(0) 推荐(0) 编辑
摘要: 公司需求 需要实现7天连续签到的功能, 开始的时候也在想,用数据库做还是用Redis的Set做, 后来查到了BitMap, 眼前一亮 到时候有的吹了. 内存级操作,满足性能要求, 而且千万级用户量 只需不到50M的内存即可完成需求 代码基于以下博客二次开发 https://blog.csdn.net 阅读全文
posted @ 2022-01-19 14:37 却道。此心安处是吾乡 阅读(141) 评论(0) 推荐(0) 编辑
摘要: synchronized -> 在<1.6版本中 锁的是monitor -> monitor依赖于底层的操作系统OS的Mutex互斥量-> 这个东西由操作系统维护 JVM其实就是调用他的线程库Pthread 其中涉及了用户态和内核态的上下文切换 因此效率非常低 自1.6版本之后 做了优化 无锁状态- 阅读全文
posted @ 2021-11-16 17:13 却道。此心安处是吾乡 阅读(21) 评论(0) 推荐(0) 编辑
摘要: /** * 类中的某些字段不校验 并返回空字段名 */public static List<String> validateProperty(Object validateObj, String... ignoreProperties) { PropertyDescriptor[] targetPd 阅读全文
posted @ 2021-10-20 13:48 却道。此心安处是吾乡 阅读(1222) 评论(0) 推荐(0) 编辑
摘要: 在学习Nacos源码的时候 意外之喜 解锁新姿势 配置中心怎么能热更新 @RefreshScope 通过这个注解进行热更新 这个注解会先销毁Bean 见方法distroy() 随后将发布一个事件 RefreshScopeRefreshedEvent 再从BeanFactory getBean() 如 阅读全文
posted @ 2021-10-13 20:40 却道。此心安处是吾乡 阅读(126) 评论(0) 推荐(0) 编辑