posts - 146,comments - 15,views - 13万
06 2024 档案
【java反射】反射中获取类属性字段比较优雅的写法
摘要:for (Field field : object.getClass().getDeclaredFields()) { try { AccessController.doPrivileged(PrivilegedAction() -> { ReflectionUtils.makeAccessible 阅读全文
posted @ 2024-06-23 12:15 人无名,则可专心练剑 编辑
【Java多线程】使用ThreadPoolTaskExecutor创建线程池
摘要:/** * 装饰器-将主线程上下文传入异步线程 * */ public class JalorContextDecorator implements TaskDecorator { @Override public Runnable decorate(Runnable runnable) { // 阅读全文
posted @ 2024-06-21 00:28 人无名,则可专心练剑 编辑
Redisson分布式锁注解方式实现
摘要:/** * redission分布式锁,用来控制Scheduled定时任务 * */ @Sl4j @Aspect @Component public class LockAspect { private RedissonClient redissonClient; @Value("${spring. 阅读全文
posted @ 2024-06-19 00:26 人无名,则可专心练剑 编辑
Redis方法注解式缓存
摘要:/** * 方法缓存注解 * * */ @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface MethodCache { /** * redisKey 的一部分 最终的 rediskey是 阅读全文
posted @ 2024-06-17 23:15 人无名,则可专心练剑 阅读(30) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示