随笔分类 - Java
摘要:核心和最大线程数(Core and maximum pool sizes) ThreadPoolExecutor 会根据指定的 corePoolSize 和 maximunPoolSize 自动调整当前线程池内线程数量(通过 getPoolSize 可以获取当前线程数量)。 值得注意的是:当 cor
阅读全文
摘要:未重写Object的finalize方法 public static class MyObject { } 使用 PhantomReference 来监听引用是否被回收 ReferenceQueue<Object> queue = new ReferenceQueue<>(); MyObject o
阅读全文
摘要:Java copyProperties方法 Spring的BeanUtils不会copy字段名相同但类型不同的属性 if (readMethod != null && ClassUtils.isAssignable(writeMethod.getParameterTypes()[0], readMe
阅读全文
摘要:可以使用 spring spi 和 import 两种方法 1. 导入 starter 依赖 1.1. maven 管理工具 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starte
阅读全文
浙公网安备 33010602011771号