[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"site-config":3,"primary-menu":6,"interview-bank":85,"interview-post-post-jb-string-immutable-6381213f":2972},{"config":4,"socialLinks":5},null,[],{"metadata":7,"spec":10,"menuItems":20},{"name":8,"creationTimestamp":9},"primary","2026-09-12T06:13:55.024154Z",{"displayName":11,"menuItems":12},"主菜单",[13,14,15,16,17,18,19],"88c3f10b-321c-4092-86a8-70db00251b74","menu-item-izrtmxer","c4c814d1-0c2c-456b-8c96-4864965fee94","menu-item-column","menu-item-tools","menu-item-zsxq","menu-item-ocrxlczu",[21,30,40,49,58,67,76],{"displayName":22,"metadata":23,"spec":25,"status":28,"children":29},"首页",{"name":13,"creationTimestamp":24},"2026-09-12T06:13:54.422830Z",{"displayName":22,"href":26,"priority":27,"menuName":8},"\u002F",0,{"displayName":22,"href":26},[],{"displayName":31,"metadata":32,"spec":34,"status":38,"children":39},"Java面试八股",{"name":14,"creationTimestamp":33},"2026-09-13T09:42:02.854891Z",{"displayName":31,"href":35,"target":36,"priority":37,"menuName":8},"\u002Fjava-interview","_self",1,{"displayName":31,"href":35},[],{"displayName":41,"metadata":42,"spec":44,"status":47,"children":48},"文章",{"name":15,"creationTimestamp":43},"2026-09-12T06:13:54.457307Z",{"displayName":41,"href":45,"priority":46,"menuName":8},"\u002Farchives",2,{"displayName":41,"href":45},[],{"displayName":50,"metadata":51,"spec":53,"status":56,"children":57},"项目实战",{"name":16,"creationTimestamp":52},"2026-09-14T00:35:08.138170Z",{"displayName":50,"href":54,"target":36,"priority":55,"menuName":8},"\u002Fcolumn",3,{"displayName":50,"href":54},[],{"displayName":59,"metadata":60,"spec":62,"status":65,"children":66},"在线工具",{"name":17,"creationTimestamp":61},"2026-09-14T00:35:08.171474Z",{"displayName":59,"href":63,"target":36,"priority":64,"menuName":8},"\u002Ftools",4,{"displayName":59,"href":63},[],{"displayName":68,"metadata":69,"spec":71,"status":74,"children":75},"知识星球",{"name":18,"creationTimestamp":70},"2026-09-14T00:35:08.199145Z",{"displayName":68,"href":72,"target":36,"priority":73,"menuName":8},"\u002Fzsxq",5,{"displayName":68,"href":72},[],{"displayName":77,"metadata":78,"spec":80,"status":83,"children":84},"特价云服务器",{"name":19,"creationTimestamp":79},"2026-09-25T15:30:59.201614Z",{"displayName":77,"href":81,"target":36,"priority":82,"menuName":8},"\u002Fserver",6,{"displayName":77,"href":81},[],{"root":86,"topics":124,"posts":2971,"latestDate":2373},{"metadata":87,"spec":92,"status":122},{"name":88,"creationTimestamp":89,"labels":90},"java-interview","2026-09-13T09:13:26.129149Z",{"haloweb.section":91},"interview",{"displayName":93,"slug":88,"cover":94,"description":95,"priority":27,"hideFromList":96,"children":97,"preventParentPostCascadeQuery":96},"Java 面试题 | 八股文","","Java 后端高频面试题系统汇总，覆盖语言基础、集合、并发、JVM、Spring、数据库、中间件与分布式架构，每题附条理化参考答案。",false,[98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121],"java-basic","java-collection","mysql","redis","rocketmq","mybatis","spring-cloud","java-concurrent","design-pattern","spring","tomcat","zookeeper","rabbitmq","jvm","network","os","dubbo","rag","ai-agent","netty","sharding","high-concurrency","high-availability","elasticsearch",{"permalink":123},"\u002Fcategories\u002Fjava-interview",[125,308,424,540,656,772,867,983,1100,1216,1333,1450,1567,1684,1801,1918,2035,2152,2269,2386,2503,2620,2737,2854],{"category":126,"posts":136},{"metadata":127,"spec":130,"status":133,"postCount":135},{"name":98,"creationTimestamp":128,"labels":129},"2026-09-13T09:13:25.495129Z",{"haloweb.section":91},{"displayName":131,"slug":98,"cover":94,"description":132,"priority":27,"hideFromList":96,"preventParentPostCascadeQuery":96},"Java 基础面试题","Java 基础面试题：语言特性、面向对象、异常体系、泛型、反射与常用 API。",{"permalink":134,"postCount":135,"visiblePostCount":135},"\u002Fcategories\u002Fjava-basic",8,[137,161,182,203,224,245,266,287],{"metadata":138,"spec":141,"status":150,"categories":155},{"name":139,"creationTimestamp":140},"post-double-equals-vs-equals-03a956b5","2026-09-13T09:11:40.146587Z",{"title":142,"slug":143,"cover":94,"excerpt":144,"publishTime":146,"categories":147,"tags":148,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"== 和 equals 的区别是什么？","double-equals-vs-equals",{"raw":94,"autoGenerate":145},true,"2026-09-13T09:11:40.197516Z",[98],[],"PUBLIC",{"permalink":151,"excerpt":152,"lastModifyTime":153,"phase":154},"\u002Farchives\u002Fdouble-equals-vs-equals","一、== 的作用 == 是 Java 的运算符，它的比较规则取决于两边的类型： 基本数据类型（byte、short、int、long、float、double、char、boolean）：比较的是字面值是否相等。 引用数据类型：比较的是两个引用是否指向堆中的同一个对象（即内存地址是否相同）。 int","2026-09-16T09:13:38.582777Z","PUBLISHED",[156],{"metadata":157,"spec":159,"status":160,"postCount":135},{"name":98,"creationTimestamp":128,"labels":158},{"haloweb.section":91},{"displayName":131,"slug":98,"cover":94,"description":132,"priority":27,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":134,"postCount":135,"visiblePostCount":135},{"metadata":162,"spec":165,"status":172,"categories":176},{"name":163,"creationTimestamp":164},"post-string-stringbuilder-stringbuffer-0b7b9e93","2026-09-13T09:11:40.343284Z",{"title":166,"slug":167,"cover":94,"excerpt":168,"publishTime":169,"categories":170,"tags":171,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"String、StringBuilder 和 StringBuffer 的区别？","string-stringbuilder-stringbuffer",{"raw":94,"autoGenerate":145},"2026-09-13T09:11:40.408558Z",[98],[],{"permalink":173,"excerpt":174,"lastModifyTime":175,"phase":154},"\u002Farchives\u002Fstring-stringbuilder-stringbuffer","一、可变性不同 String 是不可变类，内部用 final 修饰字符数组。对字符串做拼接实际上会创建新的 String 对象。 StringBuilder 与 StringBuffer 都继承自 AbstractStringBuilder，内容可变，拼接时直接修改内部数组。 二、线程安全不同 St","2026-09-16T09:13:39.164827Z",[177],{"metadata":178,"spec":180,"status":181,"postCount":135},{"name":98,"creationTimestamp":128,"labels":179},{"haloweb.section":91},{"displayName":131,"slug":98,"cover":94,"description":132,"priority":27,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":134,"postCount":135,"visiblePostCount":135},{"metadata":183,"spec":186,"status":193,"categories":197},{"name":184,"creationTimestamp":185},"post-why-override-equals-and-hashcode-4d166dda","2026-09-13T09:11:40.565423Z",{"title":187,"slug":188,"cover":94,"excerpt":189,"publishTime":190,"categories":191,"tags":192,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"为什么重写 equals 时一定要重写 hashCode？","why-override-equals-and-hashcode",{"raw":94,"autoGenerate":145},"2026-09-13T09:11:40.612965Z",[98],[],{"permalink":194,"excerpt":195,"lastModifyTime":196,"phase":154},"\u002Farchives\u002Fwhy-override-equals-and-hashcode","一、先说结论 这是 Java 的通用约定：如果两个对象通过 equals 比较相等，那么它们的 hashCode 必须相同。只重写 equals 不重写 hashCode，会破坏这个约定，导致对象在 HashMap、HashSet 等集合中行为异常。 二、HashMap 的存取过程 HashMap ","2026-09-16T09:13:39.635536Z",[198],{"metadata":199,"spec":201,"status":202,"postCount":135},{"name":98,"creationTimestamp":128,"labels":200},{"haloweb.section":91},{"displayName":131,"slug":98,"cover":94,"description":132,"priority":27,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":134,"postCount":135,"visiblePostCount":135},{"metadata":204,"spec":207,"status":214,"categories":218},{"name":205,"creationTimestamp":206},"post-jb-int-vs-integer-5ddd4c42","2026-09-13T10:00:53.622572Z",{"title":208,"slug":209,"cover":94,"excerpt":210,"publishTime":211,"categories":212,"tags":213,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"int 和 Integer 有什么区别？","jb-int-vs-integer",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:53.684952Z",[98],[],{"permalink":215,"excerpt":216,"lastModifyTime":217,"phase":154},"\u002Farchives\u002Fjb-int-vs-integer","一、本质区别 int 是 Java 的 8 种基本数据类型之一，直接存数值，占 4 字节，默认值 0。 Integer 是 int 的包装类，是对象，存的是指向堆中对象的引用，默认值 null。 二、自动装箱与拆箱 Integer a = 10;          \u002F\u002F 自动装箱：Integer.v","2026-09-16T09:13:40.094479Z",[219],{"metadata":220,"spec":222,"status":223,"postCount":135},{"name":98,"creationTimestamp":128,"labels":221},{"haloweb.section":91},{"displayName":131,"slug":98,"cover":94,"description":132,"priority":27,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":134,"postCount":135,"visiblePostCount":135},{"metadata":225,"spec":228,"status":235,"categories":239},{"name":226,"creationTimestamp":227},"post-jb-string-immutable-6381213f","2026-09-13T10:00:53.805615Z",{"title":229,"slug":230,"cover":94,"excerpt":231,"publishTime":232,"categories":233,"tags":234,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"String 为什么是不可变的？","jb-string-immutable",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:53.873603Z",[98],[],{"permalink":236,"excerpt":237,"lastModifyTime":238,"phase":154},"\u002Farchives\u002Fjb-string-immutable","一、不可变的体现 String 内部用 final char[]（JDK 9 后是 byte[]）存储字符，且没有提供修改内部数组的方法，一旦创建内容就不能改。所谓\"修改\"其实是创建新对象。 二、设计原因 字符串常量池复用：相同字面量共享同一对象，节省内存。 线程安全：不可变对象天然线程安全，多线程","2026-09-16T09:13:41.662582Z",[240],{"metadata":241,"spec":243,"status":244,"postCount":135},{"name":98,"creationTimestamp":128,"labels":242},{"haloweb.section":91},{"displayName":131,"slug":98,"cover":94,"description":132,"priority":27,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":134,"postCount":135,"visiblePostCount":135},{"metadata":246,"spec":249,"status":256,"categories":260},{"name":247,"creationTimestamp":248},"post-jb-final-keyword-80890cb4","2026-09-13T10:00:54.018756Z",{"title":250,"slug":251,"cover":94,"excerpt":252,"publishTime":253,"categories":254,"tags":255,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"final 关键字有哪些用法？","jb-final-keyword",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:54.080507Z",[98],[],{"permalink":257,"excerpt":258,"lastModifyTime":259,"phase":154},"\u002Farchives\u002Fjb-final-keyword","一、修饰类 final 修饰的类不能被继承，如 String、Math。常用于工具类或不希望被扩展的类。 二、修饰方法 final 方法不能被子类重写，防止子类改变父类行为。构造方法隐式为 final。 三、修饰变量 成员变量：必须在声明时、构造方法或初始化块中赋值，赋值后不可改。 局部变量：使用前","2026-09-16T09:13:42.613292Z",[261],{"metadata":262,"spec":264,"status":265,"postCount":135},{"name":98,"creationTimestamp":128,"labels":263},{"haloweb.section":91},{"displayName":131,"slug":98,"cover":94,"description":132,"priority":27,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":134,"postCount":135,"visiblePostCount":135},{"metadata":267,"spec":270,"status":277,"categories":281},{"name":268,"creationTimestamp":269},"post-jb-overload-vs-override-76d8b85a","2026-09-13T10:00:54.236416Z",{"title":271,"slug":272,"cover":94,"excerpt":273,"publishTime":274,"categories":275,"tags":276,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"重载（overload）和重写（override）的区别？","jb-overload-vs-override",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:54.292575Z",[98],[],{"permalink":278,"excerpt":279,"lastModifyTime":280,"phase":154},"\u002Farchives\u002Fjb-overload-vs-override","一、定义 重载：同一个类中，方法名相同，参数列表（类型\u002F个数\u002F顺序）不同。与返回值无关。 重写：子类重新实现父类的方法，方法签名（名称、参数、返回值）必须一致。 二、对比 维度 重载 重写 位置 同类 父子类 参数列表 必须不同 必须相同 返回值 可不同 相同或协变 权限 可不同 不能更严格 绑定时","2026-09-16T09:13:41.019008Z",[282],{"metadata":283,"spec":285,"status":286,"postCount":135},{"name":98,"creationTimestamp":128,"labels":284},{"haloweb.section":91},{"displayName":131,"slug":98,"cover":94,"description":132,"priority":27,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":134,"postCount":135,"visiblePostCount":135},{"metadata":288,"spec":291,"status":298,"categories":302},{"name":289,"creationTimestamp":290},"post-jb-interface-vs-abstract-de319222","2026-09-13T10:00:54.430321Z",{"title":292,"slug":293,"cover":94,"excerpt":294,"publishTime":295,"categories":296,"tags":297,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"接口和抽象类有什么区别？","jb-interface-vs-abstract",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:54.500384Z",[98],[],{"permalink":299,"excerpt":300,"lastModifyTime":301,"phase":154},"\u002Farchives\u002Fjb-interface-vs-abstract","一、核心区别 维度 抽象类 接口 关键字 abstract class interface 继承 单继承 多实现 构造方法 有 无 成员变量 任意 仅 public static final 方法实现 可有抽象\u002F具体方法 默认方法、静态方法（JDK 8+） 设计目的 \"is-a\" 共性抽取 \"can","2026-09-16T09:13:43.230261Z",[303],{"metadata":304,"spec":306,"status":307,"postCount":135},{"name":98,"creationTimestamp":128,"labels":305},{"haloweb.section":91},{"displayName":131,"slug":98,"cover":94,"description":132,"priority":27,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":134,"postCount":135,"visiblePostCount":135},{"category":309,"posts":318},{"metadata":310,"spec":313,"status":316,"postCount":73},{"name":99,"creationTimestamp":311,"labels":312},"2026-09-13T09:13:25.521651Z",{"haloweb.section":91},{"displayName":314,"slug":99,"cover":94,"description":315,"priority":37,"hideFromList":96,"preventParentPostCascadeQuery":96},"Java 集合面试题","Java 集合框架面试题：HashMap、ConcurrentHashMap 等核心容器的结构与源码原理。",{"permalink":317,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Fjava-collection",[319,340,361,382,403],{"metadata":320,"spec":323,"status":330,"categories":334},{"name":321,"creationTimestamp":322},"post-jc-arraylist-vs-linkedlist-064907ec","2026-09-13T10:00:54.635697Z",{"title":324,"slug":325,"cover":94,"excerpt":326,"publishTime":327,"categories":328,"tags":329,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"ArrayList 和 LinkedList 的区别？","jc-arraylist-vs-linkedlist",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:54.707259Z",[99],[],{"permalink":331,"excerpt":332,"lastModifyTime":333,"phase":154},"\u002Farchives\u002Fjc-arraylist-vs-linkedlist","一、底层结构 ArrayList：基于动态数组，连续内存存储。 LinkedList：基于双向链表，节点分散存储。 二、性能对比 操作 ArrayList LinkedList 随机访问 O(1) O(n) 尾部追加 O(1)（均摊） O(1) 中间插入\u002F删除 O(n)（需移动元素） O(1)（定位","2026-09-16T09:13:43.711113Z",[335],{"metadata":336,"spec":338,"status":339,"postCount":73},{"name":99,"creationTimestamp":311,"labels":337},{"haloweb.section":91},{"displayName":314,"slug":99,"cover":94,"description":315,"priority":37,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":317,"postCount":73,"visiblePostCount":73},{"metadata":341,"spec":344,"status":351,"categories":355},{"name":342,"creationTimestamp":343},"post-jc-hashmap-principle-21acf5b7","2026-09-13T10:00:54.826428Z",{"title":345,"slug":346,"cover":94,"excerpt":347,"publishTime":348,"categories":349,"tags":350,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"HashMap 的底层实现原理？","jc-hashmap-principle",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:54.884321Z",[99],[],{"permalink":352,"excerpt":353,"lastModifyTime":354,"phase":154},"\u002Farchives\u002Fjc-hashmap-principle","一、数据结构 JDK 1.8 后 HashMap = 数组 + 链表 + 红黑树。 数组是主体，通过 (n-1) & hash 定位桶。 哈希冲突时，同桶元素挂成链表。 链表长度 ≥ 8 且数组长度 ≥ 64 时，链表转红黑树；节点数 ≤ 6 时转回链表。 二、put 流程 计算 key 的 has","2026-09-16T09:13:44.648455Z",[356],{"metadata":357,"spec":359,"status":360,"postCount":73},{"name":99,"creationTimestamp":311,"labels":358},{"haloweb.section":91},{"displayName":314,"slug":99,"cover":94,"description":315,"priority":37,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":317,"postCount":73,"visiblePostCount":73},{"metadata":362,"spec":365,"status":372,"categories":376},{"name":363,"creationTimestamp":364},"post-jc-hashmap-concurrent-64bd43b8","2026-09-13T10:00:55.033490Z",{"title":366,"slug":367,"cover":94,"excerpt":368,"publishTime":369,"categories":370,"tags":371,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"ConcurrentHashMap 如何保证线程安全？","jc-hashmap-concurrent",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:55.084097Z",[99],[],{"permalink":373,"excerpt":374,"lastModifyTime":375,"phase":154},"\u002Farchives\u002Fjc-hashmap-concurrent","一、JDK 1.7：分段锁 内部是 Segment 数组，每个 Segment 是一个小 HashMap，put 时只锁当前 Segment，并发度 = Segment 数（默认 16）。 二、JDK 1.8：CAS + synchronized 数组节点为空时，用 CAS 插入，无锁。 节点不为空","2026-09-16T09:13:46.058129Z",[377],{"metadata":378,"spec":380,"status":381,"postCount":73},{"name":99,"creationTimestamp":311,"labels":379},{"haloweb.section":91},{"displayName":314,"slug":99,"cover":94,"description":315,"priority":37,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":317,"postCount":73,"visiblePostCount":73},{"metadata":383,"spec":386,"status":393,"categories":397},{"name":384,"creationTimestamp":385},"post-jc-set-impl-56908363","2026-09-13T10:00:55.238233Z",{"title":387,"slug":388,"cover":94,"excerpt":389,"publishTime":390,"categories":391,"tags":392,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"HashSet 和 TreeSet 的区别？","jc-set-impl",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:55.284648Z",[99],[],{"permalink":394,"excerpt":395,"lastModifyTime":396,"phase":154},"\u002Farchives\u002Fjc-set-impl","一、底层实现 HashSet：内部是 HashMap，元素作为 HashMap 的 key，value 是固定 Object。 TreeSet：内部是 TreeMap，基于红黑树。 二、对比 维度 HashSet TreeSet 有序性 无序 自然排序或定制排序 元素要求 重写 equals\u002Fhas","2026-09-16T09:13:47.112793Z",[398],{"metadata":399,"spec":401,"status":402,"postCount":73},{"name":99,"creationTimestamp":311,"labels":400},{"haloweb.section":91},{"displayName":314,"slug":99,"cover":94,"description":315,"priority":37,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":317,"postCount":73,"visiblePostCount":73},{"metadata":404,"spec":407,"status":414,"categories":418},{"name":405,"creationTimestamp":406},"post-jc-iterator-fail-fast-6950a006","2026-09-13T10:00:55.410836Z",{"title":408,"slug":409,"cover":94,"excerpt":410,"publishTime":411,"categories":412,"tags":413,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"什么是 fail-fast 机制？","jc-iterator-fail-fast",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:55.460328Z",[99],[],{"permalink":415,"excerpt":416,"lastModifyTime":417,"phase":154},"\u002Farchives\u002Fjc-iterator-fail-fast","一、定义 在用迭代器遍历集合时，如果集合结构被修改（增\u002F删），迭代器会立即抛出 ConcurrentModificationException，这就是 fail-fast。 二、实现原理 集合内部维护 modCount 记录结构修改次数。迭代器创建时记录 expectedModCount = mod","2026-09-16T09:13:48.072882Z",[419],{"metadata":420,"spec":422,"status":423,"postCount":73},{"name":99,"creationTimestamp":311,"labels":421},{"haloweb.section":91},{"displayName":314,"slug":99,"cover":94,"description":315,"priority":37,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":317,"postCount":73,"visiblePostCount":73},{"category":425,"posts":434},{"metadata":426,"spec":429,"status":432,"postCount":73},{"name":100,"creationTimestamp":427,"labels":428},"2026-09-13T09:13:25.545156Z",{"haloweb.section":91},{"displayName":430,"slug":100,"cover":94,"description":431,"priority":46,"hideFromList":96,"preventParentPostCascadeQuery":96},"MySQL 面试题","MySQL 面试题：索引原理、事务隔离、锁机制、SQL 调优、日志体系与分库分表。",{"permalink":433,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Fmysql",[435,456,477,498,519],{"metadata":436,"spec":439,"status":446,"categories":450},{"name":437,"creationTimestamp":438},"post-mysql-index-btree-61981a83","2026-09-13T10:00:55.574621Z",{"title":440,"slug":441,"cover":94,"excerpt":442,"publishTime":443,"categories":444,"tags":445,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"MySQL 索引为什么用 B+ 树？","mysql-index-btree",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:55.631382Z",[100],[],{"permalink":447,"excerpt":448,"lastModifyTime":449,"phase":154},"\u002Farchives\u002Fmysql-index-btree","一、B+ 树特点 非叶子节点只存索引，不存数据，单节点可容纳更多索引，树更矮。 叶子节点通过双向链表连接，范围查询效率高。 所有数据都在叶子节点，查询路径长度一致，性能稳定。 二、为什么不用 B 树 B 树非叶子节点也存数据，导致单节点索引少、树更高、磁盘 I\u002FO 多；范围查询需要中序遍历，效率低。","2026-09-16T09:13:47.604960Z",[451],{"metadata":452,"spec":454,"status":455,"postCount":73},{"name":100,"creationTimestamp":427,"labels":453},{"haloweb.section":91},{"displayName":430,"slug":100,"cover":94,"description":431,"priority":46,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":433,"postCount":73,"visiblePostCount":73},{"metadata":457,"spec":460,"status":467,"categories":471},{"name":458,"creationTimestamp":459},"post-mysql-transaction-acid-5795447c","2026-09-13T10:00:55.754027Z",{"title":461,"slug":462,"cover":94,"excerpt":463,"publishTime":464,"categories":465,"tags":466,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"事务的 ACID 特性是什么？","mysql-transaction-acid",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:55.826031Z",[100],[],{"permalink":468,"excerpt":469,"lastModifyTime":470,"phase":154},"\u002Farchives\u002Fmysql-transaction-acid","一、原子性（Atomicity） 事务中的操作要么全部成功，要么全部失败回滚。由 undo log 保证：记录修改前的旧值，回滚时反向操作。 二、一致性（Consistency） 事务前后数据满足业务约束。由原子性、隔离性、持久性共同保证，是事务的最终目标。 三、隔离性（Isolation） 并发事","2026-09-16T09:13:49.020776Z",[472],{"metadata":473,"spec":475,"status":476,"postCount":73},{"name":100,"creationTimestamp":427,"labels":474},{"haloweb.section":91},{"displayName":430,"slug":100,"cover":94,"description":431,"priority":46,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":433,"postCount":73,"visiblePostCount":73},{"metadata":478,"spec":481,"status":488,"categories":492},{"name":479,"creationTimestamp":480},"post-mysql-isolation-levels-38ba7e64","2026-09-13T10:00:55.948391Z",{"title":482,"slug":483,"cover":94,"excerpt":484,"publishTime":485,"categories":486,"tags":487,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"MySQL 的四种事务隔离级别？","mysql-isolation-levels",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:56.137691Z",[100],[],{"permalink":489,"excerpt":490,"lastModifyTime":491,"phase":154},"\u002Farchives\u002Fmysql-isolation-levels","一、四种级别（由低到高） 隔离级别 脏读 不可重复读 幻读 READ UNCOMMITTED 可能 可能 可能 READ COMMITTED 否 可能 可能 REPEATABLE READ（InnoDB 默认） 否 否 否（间隙锁） SERIALIZABLE 否 否 否 二、问题解释 脏读：读到其他","2026-09-16T09:13:49.485728Z",[493],{"metadata":494,"spec":496,"status":497,"postCount":73},{"name":100,"creationTimestamp":427,"labels":495},{"haloweb.section":91},{"displayName":430,"slug":100,"cover":94,"description":431,"priority":46,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":433,"postCount":73,"visiblePostCount":73},{"metadata":499,"spec":502,"status":509,"categories":513},{"name":500,"creationTimestamp":501},"post-mysql-mvcc-6bac3675","2026-09-13T10:00:56.263936Z",{"title":503,"slug":504,"cover":94,"excerpt":505,"publishTime":506,"categories":507,"tags":508,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"什么是 MVCC？","mysql-mvcc",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:56.441642Z",[100],[],{"permalink":510,"excerpt":511,"lastModifyTime":512,"phase":154},"\u002Farchives\u002Fmysql-mvcc","一、定义 MVCC（Multi-Version Concurrency Control，多版本并发控制），通过维护数据的多个历史版本，实现读写不阻塞，提高并发性能。 二、实现要素 隐藏字段：每行有 trx_id（创建该版本的事务 ID）和 roll_pointer（指向 undo log 中的上一版","2026-09-16T09:13:48.546617Z",[514],{"metadata":515,"spec":517,"status":518,"postCount":73},{"name":100,"creationTimestamp":427,"labels":516},{"haloweb.section":91},{"displayName":430,"slug":100,"cover":94,"description":431,"priority":46,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":433,"postCount":73,"visiblePostCount":73},{"metadata":520,"spec":523,"status":530,"categories":534},{"name":521,"creationTimestamp":522},"post-mysql-slow-sql-72d516f1","2026-09-13T10:00:56.554547Z",{"title":524,"slug":525,"cover":94,"excerpt":526,"publishTime":527,"categories":528,"tags":529,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"如何排查和优化慢 SQL？","mysql-slow-sql",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:56.602215Z",[100],[],{"permalink":531,"excerpt":532,"lastModifyTime":533,"phase":154},"\u002Farchives\u002Fmysql-slow-sql","一、排查步骤 开启慢查询日志：slow_query_log = ON，long_query_time = 1。 用 explain 分析执行计划，关注 type、key、rows、Extra。 用 show profile 看各阶段耗时。 二、常见优化 索引：给 where、join、order b","2026-09-16T09:13:50.446266Z",[535],{"metadata":536,"spec":538,"status":539,"postCount":73},{"name":100,"creationTimestamp":427,"labels":537},{"haloweb.section":91},{"displayName":430,"slug":100,"cover":94,"description":431,"priority":46,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":433,"postCount":73,"visiblePostCount":73},{"category":541,"posts":550},{"metadata":542,"spec":545,"status":548,"postCount":73},{"name":101,"creationTimestamp":543,"labels":544},"2026-09-13T09:13:25.567674Z",{"haloweb.section":91},{"displayName":546,"slug":101,"cover":94,"description":547,"priority":55,"hideFromList":96,"preventParentPostCascadeQuery":96},"Redis 面试题","Redis 面试题：数据结构与底层实现、持久化、主从集群、缓存设计与分布式锁。",{"permalink":549,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Fredis",[551,572,593,614,635],{"metadata":552,"spec":555,"status":562,"categories":566},{"name":553,"creationTimestamp":554},"post-redis-data-structures-ce205a8f","2026-09-13T10:00:56.752073Z",{"title":556,"slug":557,"cover":94,"excerpt":558,"publishTime":559,"categories":560,"tags":561,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Redis 常见数据结构及使用场景？","redis-data-structures",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:56.927778Z",[101],[],{"permalink":563,"excerpt":564,"lastModifyTime":565,"phase":154},"\u002Farchives\u002Fredis-data-structures","一、String 最基础，存字符串\u002F整数\u002F二进制。场景：缓存、计数器（incr）、分布式锁（setnx）、限流。 二、List 双向链表。场景：消息队列（lpush\u002Fbrpop）、最新列表。 三、Hash 键值对集合。场景：对象存储（用户信息）、购物车。 四、Set 无序去重集合。场景：标签、共同好","2026-09-16T09:13:50.934425Z",[567],{"metadata":568,"spec":570,"status":571,"postCount":73},{"name":101,"creationTimestamp":543,"labels":569},{"haloweb.section":91},{"displayName":546,"slug":101,"cover":94,"description":547,"priority":55,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":549,"postCount":73,"visiblePostCount":73},{"metadata":573,"spec":576,"status":583,"categories":587},{"name":574,"creationTimestamp":575},"post-redis-persistence-c40c1a6e","2026-09-13T10:00:57.060111Z",{"title":577,"slug":578,"cover":94,"excerpt":579,"publishTime":580,"categories":581,"tags":582,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Redis 的持久化方式有哪些？","redis-persistence",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:57.107399Z",[101],[],{"permalink":584,"excerpt":585,"lastModifyTime":586,"phase":154},"\u002Farchives\u002Fredis-persistence","一、RDB（快照） 原理：在某个时间点把内存数据序列化写入 dump.rdb。 触发：save（阻塞）、bgsave（fork 子进程）、自动配置（save 900 1）。 优点：文件紧凑、恢复快。 缺点：可能丢失最后一次快照后的数据。 二、AOF（追加日志） 原理：把写命令追加到 appendon","2026-09-16T09:12:30.734646Z",[588],{"metadata":589,"spec":591,"status":592,"postCount":73},{"name":101,"creationTimestamp":543,"labels":590},{"haloweb.section":91},{"displayName":546,"slug":101,"cover":94,"description":547,"priority":55,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":549,"postCount":73,"visiblePostCount":73},{"metadata":594,"spec":597,"status":604,"categories":608},{"name":595,"creationTimestamp":596},"post-redis-cache-penetration-83ba9eca","2026-09-13T10:00:57.240970Z",{"title":598,"slug":599,"cover":94,"excerpt":600,"publishTime":601,"categories":602,"tags":603,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"缓存穿透、击穿、雪崩及解决方案？","redis-cache-penetration",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:57.284484Z",[101],[],{"permalink":605,"excerpt":606,"lastModifyTime":607,"phase":154},"\u002Farchives\u002Fredis-cache-penetration","一、缓存穿透 查询不存在的数据，缓存和数据库都没有，请求全打到数据库。 解决方案： - 缓存空值（设置较短过期时间）。 - 布隆过滤器，不存在的 key 直接拦截。 二、缓存击穿 热点 key 过期瞬间，大量并发请求打到数据库。 解决方案： - 互斥锁（setnx），只有一个请求查库并回填缓存。 -","2026-09-16T09:13:38.128100Z",[609],{"metadata":610,"spec":612,"status":613,"postCount":73},{"name":101,"creationTimestamp":543,"labels":611},{"haloweb.section":91},{"displayName":546,"slug":101,"cover":94,"description":547,"priority":55,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":549,"postCount":73,"visiblePostCount":73},{"metadata":615,"spec":618,"status":625,"categories":629},{"name":616,"creationTimestamp":617},"post-redis-distributed-lock-b83520e6","2026-09-13T10:00:57.413537Z",{"title":619,"slug":620,"cover":94,"excerpt":621,"publishTime":622,"categories":623,"tags":624,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Redis 如何实现分布式锁？","redis-distributed-lock",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:57.460603Z",[101],[],{"permalink":626,"excerpt":627,"lastModifyTime":628,"phase":154},"\u002Farchives\u002Fredis-distributed-lock","一、基本实现 SET lock_key unique_value NX EX 30\n NX：key 不存在才设置。 EX：过期时间，防止死锁。 unique_value：释放锁时校验，防止误删别人的锁。 二、释放锁（Lua 脚本保证原子） if redis.call(\"get\", KEYS[1]) ","2026-09-16T09:13:40.536096Z",[630],{"metadata":631,"spec":633,"status":634,"postCount":73},{"name":101,"creationTimestamp":543,"labels":632},{"haloweb.section":91},{"displayName":546,"slug":101,"cover":94,"description":547,"priority":55,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":549,"postCount":73,"visiblePostCount":73},{"metadata":636,"spec":639,"status":646,"categories":650},{"name":637,"creationTimestamp":638},"post-redis-single-thread-d67c91bd","2026-09-13T10:00:57.608185Z",{"title":640,"slug":641,"cover":94,"excerpt":642,"publishTime":643,"categories":644,"tags":645,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Redis 为什么单线程还这么快？","redis-single-thread",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:57.655030Z",[101],[],{"permalink":647,"excerpt":648,"lastModifyTime":649,"phase":154},"\u002Farchives\u002Fredis-single-thread","一、核心原因 纯内存操作：数据在内存中，访问速度极快。 I\u002FO 多路复用：用 epoll 处理大量并发连接，单线程也能处理高并发。 避免上下文切换：单线程没有线程切换开销，也没有锁竞争。 二、Redis 6.0 多线程 Redis 6.0 引入多线程，但只用于网络 I\u002FO 的读写，命令执行仍是单线程","2026-09-16T09:13:51.386377Z",[651],{"metadata":652,"spec":654,"status":655,"postCount":73},{"name":101,"creationTimestamp":543,"labels":653},{"haloweb.section":91},{"displayName":546,"slug":101,"cover":94,"description":547,"priority":55,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":549,"postCount":73,"visiblePostCount":73},{"category":657,"posts":666},{"metadata":658,"spec":661,"status":664,"postCount":73},{"name":102,"creationTimestamp":659,"labels":660},"2026-09-13T09:13:25.595131Z",{"haloweb.section":91},{"displayName":662,"slug":102,"cover":94,"description":663,"priority":64,"hideFromList":96,"preventParentPostCascadeQuery":96},"RocketMQ 面试题","RocketMQ 面试题：消息存储与刷盘、顺序消息、事务消息、重试积压与高可用。",{"permalink":665,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Frocketmq",[667,688,709,730,751],{"metadata":668,"spec":671,"status":678,"categories":682},{"name":669,"creationTimestamp":670},"post-rocketmq-architecture-5f234f2c","2026-09-13T10:00:59.937731Z",{"title":672,"slug":673,"cover":94,"excerpt":674,"publishTime":675,"categories":676,"tags":677,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"RocketMQ 的整体架构？","rocketmq-architecture",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:59.982984Z",[102],[],{"permalink":679,"excerpt":680,"lastModifyTime":681,"phase":154},"\u002Farchives\u002Frocketmq-architecture","一、四大角色 Producer：消息生产者。 Consumer：消息消费者，支持 Push\u002FPull 两种模式。 NameServer：路由注册中心，无状态，可集群部署，节点间不通信。 Broker：消息存储与转发，可主从部署。 二、工作流程 NameServer 启动，Broker 启动后向所有 ","2026-09-16T09:14:32.272233Z",[683],{"metadata":684,"spec":686,"status":687,"postCount":73},{"name":102,"creationTimestamp":659,"labels":685},{"haloweb.section":91},{"displayName":662,"slug":102,"cover":94,"description":663,"priority":64,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":665,"postCount":73,"visiblePostCount":73},{"metadata":689,"spec":692,"status":699,"categories":703},{"name":690,"creationTimestamp":691},"post-rocketmq-message-type-0be350ba","2026-09-13T10:01:00.102484Z",{"title":693,"slug":694,"cover":94,"excerpt":695,"publishTime":696,"categories":697,"tags":698,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"RocketMQ 支持哪些消息类型？","rocketmq-message-type",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:00.301633Z",[102],[],{"permalink":700,"excerpt":701,"lastModifyTime":702,"phase":154},"\u002Farchives\u002Frocketmq-message-type","一、普通消息 最基本的消息，发完即走。 二、顺序消息 同一队列内消息严格有序。发送时用 MessageQueueSelector 把同一业务 key 的消息发到同一队列，消费时同一队列只一个线程消费。 三、延迟消息 消息发送后延迟一段时间才投递。RocketMQ 支持固定延迟级别（1s\u002F5s\u002F10s","2026-09-16T09:14:32.740019Z",[704],{"metadata":705,"spec":707,"status":708,"postCount":73},{"name":102,"creationTimestamp":659,"labels":706},{"haloweb.section":91},{"displayName":662,"slug":102,"cover":94,"description":663,"priority":64,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":665,"postCount":73,"visiblePostCount":73},{"metadata":710,"spec":713,"status":720,"categories":724},{"name":711,"creationTimestamp":712},"post-rocketmq-reliable-24e9291a","2026-09-13T10:01:00.523686Z",{"title":714,"slug":715,"cover":94,"excerpt":716,"publishTime":717,"categories":718,"tags":719,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"RocketMQ 如何保证消息不丢？","rocketmq-reliable",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:00.572891Z",[102],[],{"permalink":721,"excerpt":722,"lastModifyTime":723,"phase":154},"\u002Farchives\u002Frocketmq-reliable","一、生产端不丢 同步发送：等待 Broker ACK，失败重试。 开启重试机制：retryTimesWhenSendFailed。 事务消息保证本地事务与消息发送一致。 二、Broker 不丢 同步刷盘：消息写入磁盘才返回成功（flushDiskType=SYNC_FLUSH）。 同步复制：主从都写","2026-09-16T09:14:33.332245Z",[725],{"metadata":726,"spec":728,"status":729,"postCount":73},{"name":102,"creationTimestamp":659,"labels":727},{"haloweb.section":91},{"displayName":662,"slug":102,"cover":94,"description":663,"priority":64,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":665,"postCount":73,"visiblePostCount":73},{"metadata":731,"spec":734,"status":741,"categories":745},{"name":732,"creationTimestamp":733},"post-rocketmq-vs-kafka-754ab039","2026-09-13T10:01:00.693827Z",{"title":735,"slug":736,"cover":94,"excerpt":737,"publishTime":738,"categories":739,"tags":740,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"RocketMQ 和 Kafka 的区别？","rocketmq-vs-kafka",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:00.741026Z",[102],[],{"permalink":742,"excerpt":743,"lastModifyTime":744,"phase":154},"\u002Farchives\u002Frocketmq-vs-kafka","一、对比 维度 RocketMQ Kafka 开发语言 Java Java\u002FScala 消息模型 Topic\u002FQueue Topic\u002FPartition 顺序消息 支持 支持（分区内） 延迟消息 支持 不原生支持 事务消息 支持 不支持 吞吐量 十万级 百万级 适用场景 业务消息、事务 日志、大数据","2026-09-16T09:13:49.958883Z",[746],{"metadata":747,"spec":749,"status":750,"postCount":73},{"name":102,"creationTimestamp":659,"labels":748},{"haloweb.section":91},{"displayName":662,"slug":102,"cover":94,"description":663,"priority":64,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":665,"postCount":73,"visiblePostCount":73},{"metadata":752,"spec":755,"status":762,"categories":766},{"name":753,"creationTimestamp":754},"post-rocketmq-consume-mode-70b00679","2026-09-13T10:01:00.899415Z",{"title":756,"slug":757,"cover":94,"excerpt":758,"publishTime":759,"categories":760,"tags":761,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"RocketMQ 的集群消费和广播消费？","rocketmq-consume-mode",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:00.945332Z",[102],[],{"permalink":763,"excerpt":764,"lastModifyTime":765,"phase":154},"\u002Farchives\u002Frocketmq-consume-mode","一、集群消费（CLUSTERING） 同一条消息只被消费组内的一个消费者消费。 负载均衡：队列在消费者之间分配。 实际生产中最常用。 二、广播消费（BROADCASTING） 同一条消息被消费组内所有消费者都消费一次。 每个消费者都消费全量消息。 适用于需要所有节点都处理的场景，如配置刷新、缓存失效","2026-09-16T09:14:33.803421Z",[767],{"metadata":768,"spec":770,"status":771,"postCount":73},{"name":102,"creationTimestamp":659,"labels":769},{"haloweb.section":91},{"displayName":662,"slug":102,"cover":94,"description":663,"priority":64,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":665,"postCount":73,"visiblePostCount":73},{"category":773,"posts":782},{"metadata":774,"spec":777,"status":780,"postCount":64},{"name":103,"creationTimestamp":775,"labels":776},"2026-09-13T09:13:25.626670Z",{"haloweb.section":91},{"displayName":778,"slug":103,"cover":94,"description":779,"priority":73,"hideFromList":96,"preventParentPostCascadeQuery":96},"MyBatis 面试题","MyBatis 面试题：动态代理、一二级缓存、动态 SQL、插件机制与批量操作。",{"permalink":781,"postCount":64,"visiblePostCount":64},"\u002Fcategories\u002Fmybatis",[783,804,825,846],{"metadata":784,"spec":787,"status":794,"categories":798},{"name":785,"creationTimestamp":786},"post-mybatis-architecture-459320d3","2026-09-13T10:01:01.078209Z",{"title":788,"slug":789,"cover":94,"excerpt":790,"publishTime":791,"categories":792,"tags":793,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"MyBatis 的核心组件和执行流程？","mybatis-architecture",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:01.144018Z",[103],[],{"permalink":795,"excerpt":796,"lastModifyTime":797,"phase":154},"\u002Farchives\u002Fmybatis-architecture","一、核心组件 SqlSessionFactory：SqlSession 工厂，重量级，全局一个。 SqlSession：与数据库交互的会话，非线程安全，每次操作创建。 Executor：执行器，负责 SQL 执行和缓存维护。 StatementHandler：处理 JDBC Statement。 P","2026-09-16T09:14:34.243220Z",[799],{"metadata":800,"spec":802,"status":803,"postCount":64},{"name":103,"creationTimestamp":775,"labels":801},{"haloweb.section":91},{"displayName":778,"slug":103,"cover":94,"description":779,"priority":73,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":781,"postCount":64,"visiblePostCount":64},{"metadata":805,"spec":808,"status":815,"categories":819},{"name":806,"creationTimestamp":807},"post-mybatis-cache-37285302","2026-09-13T10:01:01.300332Z",{"title":809,"slug":810,"cover":94,"excerpt":811,"publishTime":812,"categories":813,"tags":814,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"MyBatis 的一级缓存和二级缓存？","mybatis-cache",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:01.347064Z",[103],[],{"permalink":816,"excerpt":817,"lastModifyTime":818,"phase":154},"\u002Farchives\u002Fmybatis-cache","一、一级缓存 默认开启，作用域是 SqlSession。 同一个 SqlSession 内，相同 SQL 直接从缓存取。 执行 update\u002Finsert\u002Fdelete 或 close 后缓存清空。 多个 SqlSession 不共享，可能导致脏读。 二、二级缓存 需手动开启，作用域是 Mapper","2026-09-16T09:14:34.680089Z",[820],{"metadata":821,"spec":823,"status":824,"postCount":64},{"name":103,"creationTimestamp":775,"labels":822},{"haloweb.section":91},{"displayName":778,"slug":103,"cover":94,"description":779,"priority":73,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":781,"postCount":64,"visiblePostCount":64},{"metadata":826,"spec":829,"status":836,"categories":840},{"name":827,"creationTimestamp":828},"post-mybatis-dynamic-sql-016cb843","2026-09-13T10:01:01.531779Z",{"title":830,"slug":831,"cover":94,"excerpt":832,"publishTime":833,"categories":834,"tags":835,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"MyBatis 常用动态 SQL 标签？","mybatis-dynamic-sql",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:01.590204Z",[103],[],{"permalink":837,"excerpt":838,"lastModifyTime":839,"phase":154},"\u002Farchives\u002Fmybatis-dynamic-sql","一、if 条件判断，满足则拼接 SQL 片段。 WHERE 1=1\n\u003Cif test=\"name != null\">AND name = #{name}\u003C\u002Fif>\n 二、where 自动去掉多余的 AND\u002FOR，自动加 WHERE。 \u003Cwhere>\n  \u003Cif test=\"name != null\"","2026-09-16T09:14:35.165093Z",[841],{"metadata":842,"spec":844,"status":845,"postCount":64},{"name":103,"creationTimestamp":775,"labels":843},{"haloweb.section":91},{"displayName":778,"slug":103,"cover":94,"description":779,"priority":73,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":781,"postCount":64,"visiblePostCount":64},{"metadata":847,"spec":850,"status":857,"categories":861},{"name":848,"creationTimestamp":849},"post-mybatis-lazy-loading-1fb27090","2026-09-13T10:01:01.735560Z",{"title":851,"slug":852,"cover":94,"excerpt":853,"publishTime":854,"categories":855,"tags":856,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"MyBatis 的延迟加载？","mybatis-lazy-loading",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:01.783724Z",[103],[],{"permalink":858,"excerpt":859,"lastModifyTime":860,"phase":154},"\u002Farchives\u002Fmybatis-lazy-loading","一、定义 关联查询时，只在真正用到关联对象时才执行查询加载，避免一次性加载所有数据。 二、配置 \u003Csettings>\n  \u003Csetting name=\"lazyLoadingEnabled\" value=\"true\"\u002F>\n  \u003Csetting name=\"aggressiveLazyLoading\"","2026-09-16T09:13:42.120565Z",[862],{"metadata":863,"spec":865,"status":866,"postCount":64},{"name":103,"creationTimestamp":775,"labels":864},{"haloweb.section":91},{"displayName":778,"slug":103,"cover":94,"description":779,"priority":73,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":781,"postCount":64,"visiblePostCount":64},{"category":868,"posts":877},{"metadata":869,"spec":872,"status":875,"postCount":73},{"name":104,"creationTimestamp":870,"labels":871},"2026-09-13T09:13:25.651927Z",{"haloweb.section":91},{"displayName":873,"slug":104,"cover":94,"description":874,"priority":82,"hideFromList":96,"preventParentPostCascadeQuery":96},"Spring Cloud 面试题","Spring Cloud 微服务面试题：注册中心、网关、配置中心、熔断限流与链路治理。",{"permalink":876,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Fspring-cloud",[878,899,920,941,962],{"metadata":879,"spec":882,"status":889,"categories":893},{"name":880,"creationTimestamp":881},"post-sc-components-dbcccb25","2026-09-13T10:01:02.855129Z",{"title":883,"slug":884,"cover":94,"excerpt":885,"publishTime":886,"categories":887,"tags":888,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Spring Cloud 常用组件有哪些？","sc-components",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:02.906713Z",[104],[],{"permalink":890,"excerpt":891,"lastModifyTime":892,"phase":154},"\u002Farchives\u002Fsc-components","一、注册中心 Eureka：Netflix 出品，AP，自我保护机制。 Nacos：阿里出品，支持 CP\u002FAP 切换，同时支持配置中心。 Consul：支持服务发现、KV 存储、健康检查。 二、配置中心 Spring Cloud Config：基于 Git。 Nacos Config：配置实时推送。","2026-09-16T09:14:35.918447Z",[894],{"metadata":895,"spec":897,"status":898,"postCount":73},{"name":104,"creationTimestamp":870,"labels":896},{"haloweb.section":91},{"displayName":873,"slug":104,"cover":94,"description":874,"priority":82,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":876,"postCount":73,"visiblePostCount":73},{"metadata":900,"spec":903,"status":910,"categories":914},{"name":901,"creationTimestamp":902},"post-sc-nacos-14cc902b","2026-09-13T10:01:03.041394Z",{"title":904,"slug":905,"cover":94,"excerpt":906,"publishTime":907,"categories":908,"tags":909,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Nacos 的 CP 和 AP 模式？","sc-nacos",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:03.086427Z",[104],[],{"permalink":911,"excerpt":912,"lastModifyTime":913,"phase":154},"\u002Farchives\u002Fsc-nacos","一、AP 模式（临时实例） 服务实例注册后，通过心跳维持，心跳超时则剔除。 各节点数据可能短暂不一致，但保证可用性。 适合服务注册场景，实例变化频繁。 二、CP 模式（持久实例） 实例注册需要集群半数以上节点确认，强一致性。 节点不可用时不会自动剔除，需手动注销。 适合需要强一致性的场景。 三、切换","2026-09-16T09:14:39.577571Z",[915],{"metadata":916,"spec":918,"status":919,"postCount":73},{"name":104,"creationTimestamp":870,"labels":917},{"haloweb.section":91},{"displayName":873,"slug":104,"cover":94,"description":874,"priority":82,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":876,"postCount":73,"visiblePostCount":73},{"metadata":921,"spec":924,"status":931,"categories":935},{"name":922,"creationTimestamp":923},"post-sc-gateway-3716276a","2026-09-13T10:01:03.236916Z",{"title":925,"slug":926,"cover":94,"excerpt":927,"publishTime":928,"categories":929,"tags":930,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Spring Cloud Gateway 的工作原理？","sc-gateway",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:03.432717Z",[104],[],{"permalink":932,"excerpt":933,"lastModifyTime":934,"phase":154},"\u002Farchives\u002Fsc-gateway","一、核心概念 Route：路由，由 ID、目标 URI、断言、过滤器组成。 Predicate：断言，匹配 HTTP 请求的条件（路径、方法、Header 等）。 Filter：过滤器，请求前后处理（鉴权、限流、日志、修改请求\u002F响应）。 二、执行流程 请求进入 Gateway，由 HandlerMa","2026-09-16T09:14:40.145885Z",[936],{"metadata":937,"spec":939,"status":940,"postCount":73},{"name":104,"creationTimestamp":870,"labels":938},{"haloweb.section":91},{"displayName":873,"slug":104,"cover":94,"description":874,"priority":82,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":876,"postCount":73,"visiblePostCount":73},{"metadata":942,"spec":945,"status":952,"categories":956},{"name":943,"creationTimestamp":944},"post-sc-sentinel-aca6d4ca","2026-09-13T10:01:03.588033Z",{"title":946,"slug":947,"cover":94,"excerpt":948,"publishTime":949,"categories":950,"tags":951,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Sentinel 的工作原理？","sc-sentinel",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:03.793927Z",[104],[],{"permalink":953,"excerpt":954,"lastModifyTime":955,"phase":154},"\u002Farchives\u002Fsc-sentinel","一、核心功能 流量控制：QPS、线程数限流，支持匀速、预热等模式。 熔断降级：慢调用比例、异常比例、异常数达到阈值时熔断。 系统保护：CPU、负载、入口 QPS、平均 RT、并发线程数。 热点参数限流：针对参数维度限流。 二、工作原理 基于滑动窗口统计实时指标。 通过责任链模式处理请求：NodeSe","2026-09-16T09:14:38.324239Z",[957],{"metadata":958,"spec":960,"status":961,"postCount":73},{"name":104,"creationTimestamp":870,"labels":959},{"haloweb.section":91},{"displayName":873,"slug":104,"cover":94,"description":874,"priority":82,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":876,"postCount":73,"visiblePostCount":73},{"metadata":963,"spec":966,"status":973,"categories":977},{"name":964,"creationTimestamp":965},"post-sc-feign-edab66ba","2026-09-13T10:01:03.910779Z",{"title":967,"slug":968,"cover":94,"excerpt":969,"publishTime":970,"categories":971,"tags":972,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"OpenFeign 的工作原理？","sc-feign",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:03.959628Z",[104],[],{"permalink":974,"excerpt":975,"lastModifyTime":976,"phase":154},"\u002Farchives\u002Fsc-feign","一、使用 @FeignClient(name = \"user-service\")\npublic interface UserClient {\n    @GetMapping(\"\u002Fuser\u002F{id}\")\n    User getUser(@PathVariable Long id);\n}\n 二、原理 ","2026-09-16T09:14:40.781919Z",[978],{"metadata":979,"spec":981,"status":982,"postCount":73},{"name":104,"creationTimestamp":870,"labels":980},{"haloweb.section":91},{"displayName":873,"slug":104,"cover":94,"description":874,"priority":82,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":876,"postCount":73,"visiblePostCount":73},{"category":984,"posts":994},{"metadata":985,"spec":988,"status":992,"postCount":73},{"name":105,"creationTimestamp":986,"labels":987},"2026-09-13T09:13:25.680850Z",{"haloweb.section":91},{"displayName":989,"slug":105,"cover":94,"description":990,"priority":991,"hideFromList":96,"preventParentPostCascadeQuery":96},"Java 并发面试题","Java 并发编程面试题：JMM、synchronized 与锁、线程池、AQS 与并发容器。",7,{"permalink":993,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Fjava-concurrent",[995,1016,1037,1058,1079],{"metadata":996,"spec":999,"status":1006,"categories":1010},{"name":997,"creationTimestamp":998},"post-jc-synchronized-vs-reentrantlock-135c349a","2026-09-13T10:00:58.693292Z",{"title":1000,"slug":1001,"cover":94,"excerpt":1002,"publishTime":1003,"categories":1004,"tags":1005,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"synchronized 和 ReentrantLock 的区别？","jc-synchronized-vs-reentrantlock",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:58.757444Z",[105],[],{"permalink":1007,"excerpt":1008,"lastModifyTime":1009,"phase":154},"\u002Farchives\u002Fjc-synchronized-vs-reentrantlock","一、底层实现 synchronized：JVM 级，字节码指令 monitorenter\u002Fmonitorexit，依赖对象头的 Mark Word。 ReentrantLock：JDK 级，基于 AQS（AbstractQueuedSynchronizer）实现。 二、对比 维度 synchroni","2026-09-16T09:14:31.338006Z",[1011],{"metadata":1012,"spec":1014,"status":1015,"postCount":73},{"name":105,"creationTimestamp":986,"labels":1013},{"haloweb.section":91},{"displayName":989,"slug":105,"cover":94,"description":990,"priority":991,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":993,"postCount":73,"visiblePostCount":73},{"metadata":1017,"spec":1020,"status":1027,"categories":1031},{"name":1018,"creationTimestamp":1019},"post-jc-thread-pool-9d19f73f","2026-09-13T10:00:58.904245Z",{"title":1021,"slug":1022,"cover":94,"excerpt":1023,"publishTime":1024,"categories":1025,"tags":1026,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"线程池的核心参数与工作流程？","jc-thread-pool",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:58.966174Z",[105],[],{"permalink":1028,"excerpt":1029,"lastModifyTime":1030,"phase":154},"\u002Farchives\u002Fjc-thread-pool","一、七大核心参数 corePoolSize：核心线程数，即使空闲也保留。 maximumPoolSize：最大线程数。 keepAliveTime：非核心线程空闲存活时间。 unit：时间单位。 workQueue：阻塞队列。 threadFactory：线程工厂。 handler：拒绝策略。 二、","2026-09-16T09:13:44.180134Z",[1032],{"metadata":1033,"spec":1035,"status":1036,"postCount":73},{"name":105,"creationTimestamp":986,"labels":1034},{"haloweb.section":91},{"displayName":989,"slug":105,"cover":94,"description":990,"priority":991,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":993,"postCount":73,"visiblePostCount":73},{"metadata":1038,"spec":1041,"status":1048,"categories":1052},{"name":1039,"creationTimestamp":1040},"post-jc-aqs-principle-2a5a9213","2026-09-13T10:00:59.136776Z",{"title":1042,"slug":1043,"cover":94,"excerpt":1044,"publishTime":1045,"categories":1046,"tags":1047,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"AQS 的原理是什么？","jc-aqs-principle",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:59.366386Z",[105],[],{"permalink":1049,"excerpt":1050,"lastModifyTime":1051,"phase":154},"\u002Farchives\u002Fjc-aqs-principle","一、定义 AQS（AbstractQueuedSynchronizer）是 JUC 锁的基础框架，用一个 int 状态变量（state）和一个 FIFO 等待队列实现同步。 二、核心 state：同步状态，0 表示空闲，>0 表示被占用。 CLH 队列：未获取锁的线程封装成 Node 入队，自旋 +","2026-09-16T09:14:31.781664Z",[1053],{"metadata":1054,"spec":1056,"status":1057,"postCount":73},{"name":105,"creationTimestamp":986,"labels":1055},{"haloweb.section":91},{"displayName":989,"slug":105,"cover":94,"description":990,"priority":991,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":993,"postCount":73,"visiblePostCount":73},{"metadata":1059,"spec":1062,"status":1069,"categories":1073},{"name":1060,"creationTimestamp":1061},"post-jc-volatile-b6390e4d","2026-09-13T10:00:59.557235Z",{"title":1063,"slug":1064,"cover":94,"excerpt":1065,"publishTime":1066,"categories":1067,"tags":1068,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"volatile 关键字的作用？","jc-volatile",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:59.633464Z",[105],[],{"permalink":1070,"excerpt":1071,"lastModifyTime":1072,"phase":154},"\u002Farchives\u002Fjc-volatile","一、两大作用 可见性：被 volatile 修饰的变量，一个线程修改后其他线程立即可见。实现：写入时立即刷新主内存，读取时从主内存重新加载。 禁止指令重排：在读写操作前后插入内存屏障。 二、不保证原子性 volatile int count = 0;\ncount++;   \u002F\u002F 不是原子操作，多线程","2026-09-16T09:13:45.577642Z",[1074],{"metadata":1075,"spec":1077,"status":1078,"postCount":73},{"name":105,"creationTimestamp":986,"labels":1076},{"haloweb.section":91},{"displayName":989,"slug":105,"cover":94,"description":990,"priority":991,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":993,"postCount":73,"visiblePostCount":73},{"metadata":1080,"spec":1083,"status":1090,"categories":1094},{"name":1081,"creationTimestamp":1082},"post-jc-countdownlatch-cyclicbarrier-e9df49ff","2026-09-13T10:00:59.739697Z",{"title":1084,"slug":1085,"cover":94,"excerpt":1086,"publishTime":1087,"categories":1088,"tags":1089,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"CountDownLatch 和 CyclicBarrier 的区别？","jc-countdownlatch-cyclicbarrier",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:59.785610Z",[105],[],{"permalink":1091,"excerpt":1092,"lastModifyTime":1093,"phase":154},"\u002Farchives\u002Fjc-countdownlatch-cyclicbarrier","一、CountDownLatch 一个或多个线程等待其他线程完成后再继续。 用计数器实现，countDown() 减 1，await() 等待归零。 一次性，归零后不能重置。 场景：主线程等待多个子任务完成。 二、CyclicBarrier 一组线程互相等待，全部到达屏障点后一起继续。 可循环使用，","2026-09-16T09:13:46.649457Z",[1095],{"metadata":1096,"spec":1098,"status":1099,"postCount":73},{"name":105,"creationTimestamp":986,"labels":1097},{"haloweb.section":91},{"displayName":989,"slug":105,"cover":94,"description":990,"priority":991,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":993,"postCount":73,"visiblePostCount":73},{"category":1101,"posts":1110},{"metadata":1102,"spec":1105,"status":1108,"postCount":73},{"name":106,"creationTimestamp":1103,"labels":1104},"2026-09-13T09:13:25.707776Z",{"haloweb.section":91},{"displayName":1106,"slug":106,"cover":94,"description":1107,"priority":135,"hideFromList":96,"preventParentPostCascadeQuery":96},"设计模式面试题","设计模式面试题：23 种设计模式的适用场景、实现要点及在主流框架中的真实应用。",{"permalink":1109,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Fdesign-pattern",[1111,1132,1153,1174,1195],{"metadata":1112,"spec":1115,"status":1122,"categories":1126},{"name":1113,"creationTimestamp":1114},"post-dp-singleton-efb0465b","2026-09-13T10:01:04.095486Z",{"title":1116,"slug":1117,"cover":94,"excerpt":1118,"publishTime":1119,"categories":1120,"tags":1121,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"单例模式有哪些实现方式？","dp-singleton",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:04.302972Z",[106],[],{"permalink":1123,"excerpt":1124,"lastModifyTime":1125,"phase":154},"\u002Farchives\u002Fdp-singleton","一、饿汉式 public class Singleton {\n    private static final Singleton INSTANCE = new Singleton();\n    private Singleton() {}\n    public static Singleton g","2026-09-16T09:14:41.709744Z",[1127],{"metadata":1128,"spec":1130,"status":1131,"postCount":73},{"name":106,"creationTimestamp":1103,"labels":1129},{"haloweb.section":91},{"displayName":1106,"slug":106,"cover":94,"description":1107,"priority":135,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1109,"postCount":73,"visiblePostCount":73},{"metadata":1133,"spec":1136,"status":1143,"categories":1147},{"name":1134,"creationTimestamp":1135},"post-dp-factory-76119879","2026-09-13T10:01:04.417941Z",{"title":1137,"slug":1138,"cover":94,"excerpt":1139,"publishTime":1140,"categories":1141,"tags":1142,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"工厂模式有哪几种？","dp-factory",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:04.465595Z",[106],[],{"permalink":1144,"excerpt":1145,"lastModifyTime":1146,"phase":154},"\u002Farchives\u002Fdp-factory","一、简单工厂 一个工厂类根据参数创建不同产品。违反开闭原则，新增产品需改工厂。 public class ShapeFactory {\n    public Shape create(String type) {\n        if (\"circle\".equals(type)) return n","2026-09-16T09:13:45.121345Z",[1148],{"metadata":1149,"spec":1151,"status":1152,"postCount":73},{"name":106,"creationTimestamp":1103,"labels":1150},{"haloweb.section":91},{"displayName":1106,"slug":106,"cover":94,"description":1107,"priority":135,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1109,"postCount":73,"visiblePostCount":73},{"metadata":1154,"spec":1157,"status":1164,"categories":1168},{"name":1155,"creationTimestamp":1156},"post-dp-strategy-9bce770c","2026-09-13T10:01:04.620695Z",{"title":1158,"slug":1159,"cover":94,"excerpt":1160,"publishTime":1161,"categories":1162,"tags":1163,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"策略模式的原理和应用？","dp-strategy",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:04.667250Z",[106],[],{"permalink":1165,"excerpt":1166,"lastModifyTime":1167,"phase":154},"\u002Farchives\u002Fdp-strategy","一、定义 定义一系列算法，封装成独立策略类，使它们可互换。客户端运行时选择策略，避免大量 if-else。 二、结构 Strategy：策略接口。 ConcreteStrategy：具体策略实现。 Context：持有策略引用，调用策略方法。 三、示例 public interface PayStr","2026-09-16T09:14:41.267303Z",[1169],{"metadata":1170,"spec":1172,"status":1173,"postCount":73},{"name":106,"creationTimestamp":1103,"labels":1171},{"haloweb.section":91},{"displayName":1106,"slug":106,"cover":94,"description":1107,"priority":135,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1109,"postCount":73,"visiblePostCount":73},{"metadata":1175,"spec":1178,"status":1185,"categories":1189},{"name":1176,"creationTimestamp":1177},"post-dp-observer-d3062f72","2026-09-13T10:01:04.805950Z",{"title":1179,"slug":1180,"cover":94,"excerpt":1181,"publishTime":1182,"categories":1183,"tags":1184,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"观察者模式的原理和应用？","dp-observer",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:04.852967Z",[106],[],{"permalink":1186,"excerpt":1187,"lastModifyTime":1188,"phase":154},"\u002Farchives\u002Fdp-observer","一、定义 定义对象间一对多依赖，当一个对象状态变化时，所有依赖它的对象自动收到通知并更新。也叫发布-订阅模式。 二、结构 Subject（主题）：维护观察者列表，提供注册\u002F注销\u002F通知方法。 Observer（观察者）：定义更新接口。 三、JDK 实现 \u002F\u002F 主题\npublic class Subje","2026-09-16T09:14:43.048538Z",[1190],{"metadata":1191,"spec":1193,"status":1194,"postCount":73},{"name":106,"creationTimestamp":1103,"labels":1192},{"haloweb.section":91},{"displayName":1106,"slug":106,"cover":94,"description":1107,"priority":135,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1109,"postCount":73,"visiblePostCount":73},{"metadata":1196,"spec":1199,"status":1206,"categories":1210},{"name":1197,"creationTimestamp":1198},"post-dp-decorator-0d15e0d6","2026-09-13T10:01:04.972796Z",{"title":1200,"slug":1201,"cover":94,"excerpt":1202,"publishTime":1203,"categories":1204,"tags":1205,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"装饰器模式的原理和应用？","dp-decorator",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:05.021631Z",[106],[],{"permalink":1207,"excerpt":1208,"lastModifyTime":1209,"phase":154},"\u002Farchives\u002Fdp-decorator","一、定义 动态地给对象添加额外职责，比继承更灵活。 二、结构 Component：抽象组件。 ConcreteComponent：具体组件。 Decorator：装饰器抽象类，持有 Component 引用。 ConcreteDecorator：具体装饰器，添加职责。 三、Java IO 中的应用 ","2026-09-16T09:14:42.138299Z",[1211],{"metadata":1212,"spec":1214,"status":1215,"postCount":73},{"name":106,"creationTimestamp":1103,"labels":1213},{"haloweb.section":91},{"displayName":1106,"slug":106,"cover":94,"description":1107,"priority":135,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1109,"postCount":73,"visiblePostCount":73},{"category":1217,"posts":1227},{"metadata":1218,"spec":1221,"status":1225,"postCount":73},{"name":107,"creationTimestamp":1219,"labels":1220},"2026-09-13T09:13:25.731462Z",{"haloweb.section":91},{"displayName":1222,"slug":107,"cover":94,"description":1223,"priority":1224,"hideFromList":96,"preventParentPostCascadeQuery":96},"Spring 面试题","Spring 面试题：IoC 容器、AOP 原理、声明式事务、Bean 生命周期与高频源码。",9,{"permalink":1226,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Fspring",[1228,1249,1270,1291,1312],{"metadata":1229,"spec":1232,"status":1239,"categories":1243},{"name":1230,"creationTimestamp":1231},"post-spring-ioc-di-413f32bf","2026-09-13T10:01:01.935988Z",{"title":1233,"slug":1234,"cover":94,"excerpt":1235,"publishTime":1236,"categories":1237,"tags":1238,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Spring 的 IOC 和 DI 是什么？","spring-ioc-di",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:01.985311Z",[107],[],{"permalink":1240,"excerpt":1241,"lastModifyTime":1242,"phase":154},"\u002Farchives\u002Fspring-ioc-di","一、IOC（控制反转） 对象的创建和依赖管理由容器负责，而不是在代码中 new。控制权从业务代码转移到 Spring 容器。 二、DI（依赖注入） IOC 的实现方式。容器把对象依赖的其他对象注入进去。 三种注入方式： - 构造器注入：通过构造方法，推荐（依赖不可变、无循环依赖风险）。 - sett","2026-09-16T09:13:51.823789Z",[1244],{"metadata":1245,"spec":1247,"status":1248,"postCount":73},{"name":107,"creationTimestamp":1219,"labels":1246},{"haloweb.section":91},{"displayName":1222,"slug":107,"cover":94,"description":1223,"priority":1224,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1226,"postCount":73,"visiblePostCount":73},{"metadata":1250,"spec":1253,"status":1260,"categories":1264},{"name":1251,"creationTimestamp":1252},"post-spring-bean-scope-0026d011","2026-09-13T10:01:02.137013Z",{"title":1254,"slug":1255,"cover":94,"excerpt":1256,"publishTime":1257,"categories":1258,"tags":1259,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Spring Bean 的作用域有哪些？","spring-bean-scope",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:02.186869Z",[107],[],{"permalink":1261,"excerpt":1262,"lastModifyTime":1263,"phase":154},"\u002Farchives\u002Fspring-bean-scope","一、singleton（默认） 容器中只有一个实例，全局共享。适合无状态 Bean。 二、prototype 每次获取都创建新实例。适合有状态 Bean。 三、request（Web） 每次 HTTP 请求一个实例。 四、session（Web） 每个 HTTP Session 一个实例。 五、ap","2026-09-16T09:14:36.382287Z",[1265],{"metadata":1266,"spec":1268,"status":1269,"postCount":73},{"name":107,"creationTimestamp":1219,"labels":1267},{"haloweb.section":91},{"displayName":1222,"slug":107,"cover":94,"description":1223,"priority":1224,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1226,"postCount":73,"visiblePostCount":73},{"metadata":1271,"spec":1274,"status":1281,"categories":1285},{"name":1272,"creationTimestamp":1273},"post-spring-aop-000624ea","2026-09-13T10:01:02.330064Z",{"title":1275,"slug":1276,"cover":94,"excerpt":1277,"publishTime":1278,"categories":1279,"tags":1280,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Spring AOP 的实现原理？","spring-aop",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:02.385481Z",[107],[],{"permalink":1282,"excerpt":1283,"lastModifyTime":1284,"phase":154},"\u002Farchives\u002Fspring-aop","一、AOP 概念 面向切面编程，把横切逻辑（日志、事务、权限）从业务代码中抽离，通过动态织入实现。 二、动态代理 JDK 动态代理：目标类实现接口时使用，基于反射生成代理类。 CGLIB 代理：目标类无接口时使用，基于 ASM 生成目标类的子类。 Spring 自动选择：有接口用 JDK，无接口用 ","2026-09-16T09:14:36.969681Z",[1286],{"metadata":1287,"spec":1289,"status":1290,"postCount":73},{"name":107,"creationTimestamp":1219,"labels":1288},{"haloweb.section":91},{"displayName":1222,"slug":107,"cover":94,"description":1223,"priority":1224,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1226,"postCount":73,"visiblePostCount":73},{"metadata":1292,"spec":1295,"status":1302,"categories":1306},{"name":1293,"creationTimestamp":1294},"post-spring-transaction-4d4be0d6","2026-09-13T10:01:02.510982Z",{"title":1296,"slug":1297,"cover":94,"excerpt":1298,"publishTime":1299,"categories":1300,"tags":1301,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Spring 事务的传播行为和隔离级别？","spring-transaction",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:02.556020Z",[107],[],{"permalink":1303,"excerpt":1304,"lastModifyTime":1305,"phase":154},"\u002Farchives\u002Fspring-transaction","一、七种传播行为 传播行为 说明 REQUIRED（默认） 有事务就加入，没有就新建 REQUIRES_NEW 总是新建事务，挂起当前事务 SUPPORTS 有事务就加入，没有就非事务执行 NOT_SUPPORTED 非事务执行，挂起当前事务 MANDATORY 必须有事务，否则抛异常 NEVER ","2026-09-16T09:14:37.402303Z",[1307],{"metadata":1308,"spec":1310,"status":1311,"postCount":73},{"name":107,"creationTimestamp":1219,"labels":1309},{"haloweb.section":91},{"displayName":1222,"slug":107,"cover":94,"description":1223,"priority":1224,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1226,"postCount":73,"visiblePostCount":73},{"metadata":1313,"spec":1316,"status":1323,"categories":1327},{"name":1314,"creationTimestamp":1315},"post-spring-circular-dependency-94e0cc24","2026-09-13T10:01:02.690961Z",{"title":1317,"slug":1318,"cover":94,"excerpt":1319,"publishTime":1320,"categories":1321,"tags":1322,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Spring 如何解决循环依赖？","spring-circular-dependency",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:02.739844Z",[107],[],{"permalink":1324,"excerpt":1325,"lastModifyTime":1326,"phase":154},"\u002Farchives\u002Fspring-circular-dependency","一、什么是循环依赖 A 依赖 B，B 依赖 A，形成循环。 二、三级缓存 Spring 通过三级缓存解决 singleton 的循环依赖： singletonObjects：一级缓存，存完全初始化好的 Bean。 earlySingletonObjects：二级缓存，存早期引用（实例化但未属性赋值）","2026-09-16T09:14:37.864948Z",[1328],{"metadata":1329,"spec":1331,"status":1332,"postCount":73},{"name":107,"creationTimestamp":1219,"labels":1330},{"haloweb.section":91},{"displayName":1222,"slug":107,"cover":94,"description":1223,"priority":1224,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1226,"postCount":73,"visiblePostCount":73},{"category":1334,"posts":1344},{"metadata":1335,"spec":1338,"status":1342,"postCount":73},{"name":108,"creationTimestamp":1336,"labels":1337},"2026-09-13T09:13:25.759540Z",{"haloweb.section":91},{"displayName":1339,"slug":108,"cover":94,"description":1340,"priority":1341,"hideFromList":96,"preventParentPostCascadeQuery":96},"Tomcat 面试题","Tomcat 面试题：整体架构、类加载机制、连接器模型、线程池与性能调优。",10,{"permalink":1343,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Ftomcat",[1345,1366,1387,1408,1429],{"metadata":1346,"spec":1349,"status":1356,"categories":1360},{"name":1347,"creationTimestamp":1348},"post-tomcat-architecture-069d50f9","2026-09-13T10:01:09.794498Z",{"title":1350,"slug":1351,"cover":94,"excerpt":1352,"publishTime":1353,"categories":1354,"tags":1355,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Tomcat 的整体架构？","tomcat-architecture",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:09.841985Z",[108],[],{"permalink":1357,"excerpt":1358,"lastModifyTime":1359,"phase":154},"\u002Farchives\u002Ftomcat-architecture","一、核心组件 Server：Tomcat 顶层容器，管理 Service 生命周期。 Service：包含 Connector 和 Engine，一个 Tomcat 可有多个 Service。 Connector：连接器，监听端口，接收请求并转换为 Request，如 HTTP\u002F1.1、AJP。 E","2026-09-16T09:15:41.748689Z",[1361],{"metadata":1362,"spec":1364,"status":1365,"postCount":73},{"name":108,"creationTimestamp":1336,"labels":1363},{"haloweb.section":91},{"displayName":1339,"slug":108,"cover":94,"description":1340,"priority":1341,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1343,"postCount":73,"visiblePostCount":73},{"metadata":1367,"spec":1370,"status":1377,"categories":1381},{"name":1368,"creationTimestamp":1369},"post-tomcat-connector-1a9adcb4","2026-09-13T10:01:09.986554Z",{"title":1371,"slug":1372,"cover":94,"excerpt":1373,"publishTime":1374,"categories":1375,"tags":1376,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Tomcat Connector 的工作模式？","tomcat-connector",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:10.148457Z",[108],[],{"permalink":1378,"excerpt":1379,"lastModifyTime":1380,"phase":154},"\u002Farchives\u002Ftomcat-connector","一、三种运行模式 BIO：阻塞 IO，每个请求一个线程，Tomcat 7 前默认。 NIO：非阻塞 IO，基于 Java NIO，Tomcat 8 默认。 APR：基于 Apache Portable Runtime，原生 C 库，性能最好。 二、NIO 模式 一个 Acceptor 线程接收连接。","2026-09-16T09:15:39.756354Z",[1382],{"metadata":1383,"spec":1385,"status":1386,"postCount":73},{"name":108,"creationTimestamp":1336,"labels":1384},{"haloweb.section":91},{"displayName":1339,"slug":108,"cover":94,"description":1340,"priority":1341,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1343,"postCount":73,"visiblePostCount":73},{"metadata":1388,"spec":1391,"status":1398,"categories":1402},{"name":1389,"creationTimestamp":1390},"post-tomcat-session-09e900f9","2026-09-13T10:01:10.279273Z",{"title":1392,"slug":1393,"cover":94,"excerpt":1394,"publishTime":1395,"categories":1396,"tags":1397,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Tomcat 的 Session 管理？","tomcat-session",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:10.325830Z",[108],[],{"permalink":1399,"excerpt":1400,"lastModifyTime":1401,"phase":154},"\u002Farchives\u002Ftomcat-session","一、Session 实现 Tomcat 用 StandardSession 实现 HttpSession，存在内存中，由 Manager 管理。 二、持久化 StandardManager：Tomcat 关闭时序列化 Session 到 SESSIONS.ser，启动时恢复。 PersistentM","2026-09-16T09:15:42.675401Z",[1403],{"metadata":1404,"spec":1406,"status":1407,"postCount":73},{"name":108,"creationTimestamp":1336,"labels":1405},{"haloweb.section":91},{"displayName":1339,"slug":108,"cover":94,"description":1340,"priority":1341,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1343,"postCount":73,"visiblePostCount":73},{"metadata":1409,"spec":1412,"status":1419,"categories":1423},{"name":1410,"creationTimestamp":1411},"post-tomcat-valve-315956e1","2026-09-13T10:01:10.457861Z",{"title":1413,"slug":1414,"cover":94,"excerpt":1415,"publishTime":1416,"categories":1417,"tags":1418,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Tomcat 的 Valve 机制？","tomcat-valve",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:10.502555Z",[108],[],{"permalink":1420,"excerpt":1421,"lastModifyTime":1422,"phase":154},"\u002Farchives\u002Ftomcat-valve","一、定义 Valve（阀门）是 Tomcat 的拦截器机制，类似 Servlet Filter，但作用在容器层面（Engine\u002FHost\u002FContext）。 二、常用 Valve AccessLogValve：访问日志。 RemoteAddrValve：IP 黑白名单。 RemoteHostValv","2026-09-16T09:15:43.118472Z",[1424],{"metadata":1425,"spec":1427,"status":1428,"postCount":73},{"name":108,"creationTimestamp":1336,"labels":1426},{"haloweb.section":91},{"displayName":1339,"slug":108,"cover":94,"description":1340,"priority":1341,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1343,"postCount":73,"visiblePostCount":73},{"metadata":1430,"spec":1433,"status":1440,"categories":1444},{"name":1431,"creationTimestamp":1432},"post-tomcat-deploy-e44a593c","2026-09-13T10:01:10.611263Z",{"title":1434,"slug":1435,"cover":94,"excerpt":1436,"publishTime":1437,"categories":1438,"tags":1439,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Tomcat 的部署方式有哪些？","tomcat-deploy",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:10.656984Z",[108],[],{"permalink":1441,"excerpt":1442,"lastModifyTime":1443,"phase":154},"\u002Farchives\u002Ftomcat-deploy","一、WAR 包部署 把 WAR 放到 webapps 目录，Tomcat 自动解压部署。最常用。 二、目录部署 直接把解压后的应用目录放到 webapps，或通过 Context 配置指定路径。 三、Context 片段部署 在 conf\u002FCatalina\u002Flocalhost\u002F 下放 context","2026-09-16T09:15:15.246373Z",[1445],{"metadata":1446,"spec":1448,"status":1449,"postCount":73},{"name":108,"creationTimestamp":1336,"labels":1447},{"haloweb.section":91},{"displayName":1339,"slug":108,"cover":94,"description":1340,"priority":1341,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1343,"postCount":73,"visiblePostCount":73},{"category":1451,"posts":1461},{"metadata":1452,"spec":1455,"status":1459,"postCount":73},{"name":109,"creationTimestamp":1453,"labels":1454},"2026-09-13T09:13:25.785846Z",{"haloweb.section":91},{"displayName":1456,"slug":109,"cover":94,"description":1457,"priority":1458,"hideFromList":96,"preventParentPostCascadeQuery":96},"Zookeeper 面试题","Zookeeper 面试题：数据节点、Watcher 机制、ZAB 协议与分布式锁选举实现。",11,{"permalink":1460,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Fzookeeper",[1462,1483,1504,1525,1546],{"metadata":1463,"spec":1466,"status":1473,"categories":1477},{"name":1464,"creationTimestamp":1465},"post-zk-data-model-a6c49102","2026-09-13T10:01:07.565180Z",{"title":1467,"slug":1468,"cover":94,"excerpt":1469,"publishTime":1470,"categories":1471,"tags":1472,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"ZooKeeper 的数据模型？","zk-data-model",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:07.617887Z",[109],[],{"permalink":1474,"excerpt":1475,"lastModifyTime":1476,"phase":154},"\u002Farchives\u002Fzk-data-model","一、ZNode ZooKeeper 数据以树形结构存储，每个节点叫 ZNode，路径用 \u002F 分隔，如 \u002Fa\u002Fb\u002Fc。 二、节点类型 持久节点：创建后一直存在，直到删除。 临时节点：创建者会话断开自动删除。 持久顺序节点：持久 + 单调递增序号。 临时顺序节点：临时 + 单调递增序号，常用于分布式锁。","2026-09-16T09:15:14.325893Z",[1478],{"metadata":1479,"spec":1481,"status":1482,"postCount":73},{"name":109,"creationTimestamp":1453,"labels":1480},{"haloweb.section":91},{"displayName":1456,"slug":109,"cover":94,"description":1457,"priority":1458,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1460,"postCount":73,"visiblePostCount":73},{"metadata":1484,"spec":1487,"status":1494,"categories":1498},{"name":1485,"creationTimestamp":1486},"post-zk-consistency-c28d9cc9","2026-09-13T10:01:07.760506Z",{"title":1488,"slug":1489,"cover":94,"excerpt":1490,"publishTime":1491,"categories":1492,"tags":1493,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"ZooKeeper 如何保证一致性？","zk-consistency",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:07.825110Z",[109],[],{"permalink":1495,"excerpt":1496,"lastModifyTime":1497,"phase":154},"\u002Farchives\u002Fzk-consistency","一、ZAB 协议 ZooKeeper Atomic Broadcast，类似 Paxos。 二、角色 Leader：处理写请求，发起投票。 Follower：处理读请求，参与投票。 Observer：只读，不参与投票，扩展读能力。 三、写流程 客户端写请求发给任意节点，非 Leader 转发给 Le","2026-09-16T09:15:13.291445Z",[1499],{"metadata":1500,"spec":1502,"status":1503,"postCount":73},{"name":109,"creationTimestamp":1453,"labels":1501},{"haloweb.section":91},{"displayName":1456,"slug":109,"cover":94,"description":1457,"priority":1458,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1460,"postCount":73,"visiblePostCount":73},{"metadata":1505,"spec":1508,"status":1515,"categories":1519},{"name":1506,"creationTimestamp":1507},"post-zk-distributed-lock-fd097039","2026-09-13T10:01:07.954983Z",{"title":1509,"slug":1510,"cover":94,"excerpt":1511,"publishTime":1512,"categories":1513,"tags":1514,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"ZooKeeper 实现分布式锁？","zk-distributed-lock",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:08.004287Z",[109],[],{"permalink":1516,"excerpt":1517,"lastModifyTime":1518,"phase":154},"\u002Farchives\u002Fzk-distributed-lock","一、原理 利用临时顺序节点 + Watcher。 二、加锁流程 在 \u002Flock 节点下创建临时顺序节点 \u002Flock\u002Fseq-000000001。 获取 \u002Flock 下所有子节点，判断自己是否最小。 是最小 → 获取锁成功。 不是最小 → 监听前一个节点的删除事件，阻塞等待。 三、释放锁 主动删除自己","2026-09-16T09:14:42.588286Z",[1520],{"metadata":1521,"spec":1523,"status":1524,"postCount":73},{"name":109,"creationTimestamp":1453,"labels":1522},{"haloweb.section":91},{"displayName":1456,"slug":109,"cover":94,"description":1457,"priority":1458,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1460,"postCount":73,"visiblePostCount":73},{"metadata":1526,"spec":1529,"status":1536,"categories":1540},{"name":1527,"creationTimestamp":1528},"post-zk-watcher-831fbae2","2026-09-13T10:01:08.166056Z",{"title":1530,"slug":1531,"cover":94,"excerpt":1532,"publishTime":1533,"categories":1534,"tags":1535,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"ZooKeeper 的 Watcher 机制？","zk-watcher",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:08.357926Z",[109],[],{"permalink":1537,"excerpt":1538,"lastModifyTime":1539,"phase":154},"\u002Farchives\u002Fzk-watcher","一、定义 客户端可以在 ZNode 上注册 Watcher，当节点状态变化时，服务端通知客户端，触发回调。 二、特性 一次性：Watcher 触发后失效，需重新注册。 轻量：只发送事件类型和路径，不发送数据。 异步：通知是异步发送的。 三、事件类型 NodeCreated：节点创建。 NodeDel","2026-09-16T09:15:14.749985Z",[1541],{"metadata":1542,"spec":1544,"status":1545,"postCount":73},{"name":109,"creationTimestamp":1453,"labels":1543},{"haloweb.section":91},{"displayName":1456,"slug":109,"cover":94,"description":1457,"priority":1458,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1460,"postCount":73,"visiblePostCount":73},{"metadata":1547,"spec":1550,"status":1557,"categories":1561},{"name":1548,"creationTimestamp":1549},"post-zk-vs-nacos-9f45de84","2026-09-13T10:01:08.519766Z",{"title":1551,"slug":1552,"cover":94,"excerpt":1553,"publishTime":1554,"categories":1555,"tags":1556,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"ZooKeeper 和 Nacos 的区别？","zk-vs-nacos",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:08.716026Z",[109],[],{"permalink":1558,"excerpt":1559,"lastModifyTime":1560,"phase":154},"\u002Farchives\u002Fzk-vs-nacos","一、对比 维度 ZooKeeper Nacos 一致性 CP（ZAB） 支持 CP\u002FAP 配置中心 需自行封装 原生支持，实时推送 服务发现 临时节点 临时\u002F持久实例 控制台 无官方 有 Web 控制台 语言 Java Java 二、选择 需要强一致、分布式协调（锁、选主）→ ZooKeeper。 ","2026-09-16T09:15:13.739294Z",[1562],{"metadata":1563,"spec":1565,"status":1566,"postCount":73},{"name":109,"creationTimestamp":1453,"labels":1564},{"haloweb.section":91},{"displayName":1456,"slug":109,"cover":94,"description":1457,"priority":1458,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1460,"postCount":73,"visiblePostCount":73},{"category":1568,"posts":1578},{"metadata":1569,"spec":1572,"status":1576,"postCount":73},{"name":110,"creationTimestamp":1570,"labels":1571},"2026-09-13T09:13:25.810188Z",{"haloweb.section":91},{"displayName":1573,"slug":110,"cover":94,"description":1574,"priority":1575,"hideFromList":96,"preventParentPostCascadeQuery":96},"RabbitMQ 面试题","RabbitMQ 面试题：消息可靠性投递、死信队列、镜像队列、消费幂等与积压处理。",12,{"permalink":1577,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Frabbitmq",[1579,1600,1621,1642,1663],{"metadata":1580,"spec":1583,"status":1590,"categories":1594},{"name":1581,"creationTimestamp":1582},"post-rabbitmq-architecture-b1256445","2026-09-13T10:01:08.867235Z",{"title":1584,"slug":1585,"cover":94,"excerpt":1586,"publishTime":1587,"categories":1588,"tags":1589,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"RabbitMQ 的核心概念？","rabbitmq-architecture",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:08.910375Z",[110],[],{"permalink":1591,"excerpt":1592,"lastModifyTime":1593,"phase":154},"\u002Farchives\u002Frabbitmq-architecture","一、核心组件 Producer：生产者，发送消息到 Exchange。 Exchange：交换机，接收消息并按路由规则路由到 Queue。 Queue：队列，存储消息，消费者从队列取。 Consumer：消费者。 Binding：Exchange 和 Queue 的绑定关系，带 routing ke","2026-09-16T09:14:38.789864Z",[1595],{"metadata":1596,"spec":1598,"status":1599,"postCount":73},{"name":110,"creationTimestamp":1570,"labels":1597},{"haloweb.section":91},{"displayName":1573,"slug":110,"cover":94,"description":1574,"priority":1575,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1577,"postCount":73,"visiblePostCount":73},{"metadata":1601,"spec":1604,"status":1611,"categories":1615},{"name":1602,"creationTimestamp":1603},"post-rabbitmq-message-ack-34ff22c9","2026-09-13T10:01:09.065945Z",{"title":1605,"slug":1606,"cover":94,"excerpt":1607,"publishTime":1608,"categories":1609,"tags":1610,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"RabbitMQ 的消息确认机制？","rabbitmq-message-ack",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:09.112893Z",[110],[],{"permalink":1612,"excerpt":1613,"lastModifyTime":1614,"phase":154},"\u002Farchives\u002Frabbitmq-message-ack","一、生产者确认（Publisher Confirm） 消息投递到 Exchange 后返回 confirm。 消息路由到 Queue（持久化消息持久化到磁盘）后返回 ack。 可配合 mandatory 参数，消息不可路由时返回给生产者。 二、消费者确认（Consumer ACK） 自动确认（aut","2026-09-16T09:14:45.553264Z",[1616],{"metadata":1617,"spec":1619,"status":1620,"postCount":73},{"name":110,"creationTimestamp":1570,"labels":1618},{"haloweb.section":91},{"displayName":1573,"slug":110,"cover":94,"description":1574,"priority":1575,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1577,"postCount":73,"visiblePostCount":73},{"metadata":1622,"spec":1625,"status":1632,"categories":1636},{"name":1623,"creationTimestamp":1624},"post-rabbitmq-reliable-d15663a6","2026-09-13T10:01:09.246619Z",{"title":1626,"slug":1627,"cover":94,"excerpt":1628,"publishTime":1629,"categories":1630,"tags":1631,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"RabbitMQ 如何保证消息可靠？","rabbitmq-reliable",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:09.295435Z",[110],[],{"permalink":1633,"excerpt":1634,"lastModifyTime":1635,"phase":154},"\u002Farchives\u002Frabbitmq-reliable","一、生产端 开启 Publisher Confirm，确保消息到达 Exchange。 开启 Return 机制，消息不可路由时通知生产者。 本地消息表 + 定时补偿。 二、Broker 端 交换机、队列、消息都持久化（durable=true, deliveryMode=2）。 镜像队列：队列复制","2026-09-16T09:15:10.999791Z",[1637],{"metadata":1638,"spec":1640,"status":1641,"postCount":73},{"name":110,"creationTimestamp":1570,"labels":1639},{"haloweb.section":91},{"displayName":1573,"slug":110,"cover":94,"description":1574,"priority":1575,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1577,"postCount":73,"visiblePostCount":73},{"metadata":1643,"spec":1646,"status":1653,"categories":1657},{"name":1644,"creationTimestamp":1645},"post-rabbitmq-vs-rocketmq-3e9be184","2026-09-13T10:01:09.436936Z",{"title":1647,"slug":1648,"cover":94,"excerpt":1649,"publishTime":1650,"categories":1651,"tags":1652,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"RabbitMQ 和 RocketMQ 的区别？","rabbitmq-vs-rocketmq",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:09.484368Z",[110],[],{"permalink":1654,"excerpt":1655,"lastModifyTime":1656,"phase":154},"\u002Farchives\u002Frabbitmq-vs-rocketmq","一、对比 维度 RabbitMQ RocketMQ 开发语言 Erlang Java 吞吐量 万级 十万级 延迟 微秒级 毫秒级 事务消息 不支持 支持 顺序消息 支持（弱） 支持 延迟消息 支持插件 原生支持 管理界面 有 有 二、选择","2026-09-16T09:15:40.237199Z",[1658],{"metadata":1659,"spec":1661,"status":1662,"postCount":73},{"name":110,"creationTimestamp":1570,"labels":1660},{"haloweb.section":91},{"displayName":1573,"slug":110,"cover":94,"description":1574,"priority":1575,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1577,"postCount":73,"visiblePostCount":73},{"metadata":1664,"spec":1667,"status":1674,"categories":1678},{"name":1665,"creationTimestamp":1666},"post-rabbitmq-prefetch-87e4d077","2026-09-13T10:01:09.619926Z",{"title":1668,"slug":1669,"cover":94,"excerpt":1670,"publishTime":1671,"categories":1672,"tags":1673,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"RabbitMQ 的 prefetch 机制？","rabbitmq-prefetch",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:09.668453Z",[110],[],{"permalink":1675,"excerpt":1676,"lastModifyTime":1677,"phase":154},"\u002Farchives\u002Frabbitmq-prefetch","一、定义 prefetch（QoS）控制 RabbitMQ 一次推送给消费者多少条未确认的消息，实现限流和负载均衡。 二、设置 channel.basicQos(10); \u002F\u002F 每个消费者最多 10 条未确认消息\n 三、作用 防止消息都推给快的消费者，慢的消费者闲置，实现公平分发。 防止消费者内存被","2026-09-16T09:15:40.693057Z",[1679],{"metadata":1680,"spec":1682,"status":1683,"postCount":73},{"name":110,"creationTimestamp":1570,"labels":1681},{"haloweb.section":91},{"displayName":1573,"slug":110,"cover":94,"description":1574,"priority":1575,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1577,"postCount":73,"visiblePostCount":73},{"category":1685,"posts":1695},{"metadata":1686,"spec":1689,"status":1693,"postCount":73},{"name":111,"creationTimestamp":1687,"labels":1688},"2026-09-13T09:13:25.841121Z",{"haloweb.section":91},{"displayName":1690,"slug":111,"cover":94,"description":1691,"priority":1692,"hideFromList":96,"preventParentPostCascadeQuery":96},"JVM 面试题","JVM 面试题：内存区域、垃圾回收算法与收集器、类加载机制与线上调优参数。",13,{"permalink":1694,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Fjvm",[1696,1717,1738,1759,1780],{"metadata":1697,"spec":1700,"status":1707,"categories":1711},{"name":1698,"creationTimestamp":1699},"post-jvm-memory-structure-42710c3c","2026-09-13T10:00:57.786002Z",{"title":1701,"slug":1702,"cover":94,"excerpt":1703,"publishTime":1704,"categories":1705,"tags":1706,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"JVM 运行时内存结构？","jvm-memory-structure",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:57.832357Z",[111],[],{"permalink":1708,"excerpt":1709,"lastModifyTime":1710,"phase":154},"\u002Farchives\u002Fjvm-memory-structure","一、线程私有 程序计数器：记录当前线程执行的字节码行号，唯一不会 OOM 的区域。 虚拟机栈：每个方法调用创建一个栈帧，存局部变量、操作数栈、动态链接。栈深度过深抛 StackOverflowError。 本地方法栈：为 native 方法服务。 二、线程共享 堆：对象实例和数组，GC 主要区域，可","2026-09-16T09:13:37.671380Z",[1712],{"metadata":1713,"spec":1715,"status":1716,"postCount":73},{"name":111,"creationTimestamp":1687,"labels":1714},{"haloweb.section":91},{"displayName":1690,"slug":111,"cover":94,"description":1691,"priority":1692,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1694,"postCount":73,"visiblePostCount":73},{"metadata":1718,"spec":1721,"status":1728,"categories":1732},{"name":1719,"creationTimestamp":1720},"post-jvm-gc-algorithms-f3d021b9","2026-09-13T10:00:57.985775Z",{"title":1722,"slug":1723,"cover":94,"excerpt":1724,"publishTime":1725,"categories":1726,"tags":1727,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"常见的垃圾回收算法？","jvm-gc-algorithms",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:58.037353Z",[111],[],{"permalink":1729,"excerpt":1730,"lastModifyTime":1731,"phase":154},"\u002Farchives\u002Fjvm-gc-algorithms","一、判断对象是否可回收 引用计数法：对象被引用计数 +1，为 0 则回收。无法解决循环引用。 可达性分析：从 GC Roots 出发，不可达的对象可回收。GC Roots 包括栈中引用、静态变量、常量、JNI 引用。 二、回收算法 标记-清除：标记存活对象，清除垃圾。缺点：内存碎片。 标记-复制：内","2026-09-16T09:13:37.177956Z",[1733],{"metadata":1734,"spec":1736,"status":1737,"postCount":73},{"name":111,"creationTimestamp":1687,"labels":1735},{"haloweb.section":91},{"displayName":1690,"slug":111,"cover":94,"description":1691,"priority":1692,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1694,"postCount":73,"visiblePostCount":73},{"metadata":1739,"spec":1742,"status":1749,"categories":1753},{"name":1740,"creationTimestamp":1741},"post-jvm-cms-vs-g1-a6ba005b","2026-09-13T10:00:58.169843Z",{"title":1743,"slug":1744,"cover":94,"excerpt":1745,"publishTime":1746,"categories":1747,"tags":1748,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"CMS 和 G1 的区别？","jvm-cms-vs-g1",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:58.215157Z",[111],[],{"permalink":1750,"excerpt":1751,"lastModifyTime":1752,"phase":154},"\u002Farchives\u002Fjvm-cms-vs-g1","一、CMS 基于标记-清除算法。 以最短停顿时间为目标。 流程：初始标记（STW）→ 并发标记 → 重新标记（STW）→ 并发清除。 缺点：内存碎片、并发阶段消耗 CPU、浮动垃圾、可能 Concurrent Mode Failure 退化为 Serial Old。 二、G1 把堆分成多个 Regi","2026-09-16T09:12:31.222727Z",[1754],{"metadata":1755,"spec":1757,"status":1758,"postCount":73},{"name":111,"creationTimestamp":1687,"labels":1756},{"haloweb.section":91},{"displayName":1690,"slug":111,"cover":94,"description":1691,"priority":1692,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1694,"postCount":73,"visiblePostCount":73},{"metadata":1760,"spec":1763,"status":1770,"categories":1774},{"name":1761,"creationTimestamp":1762},"post-jvm-class-loading-e984c960","2026-09-13T10:00:58.362832Z",{"title":1764,"slug":1765,"cover":94,"excerpt":1766,"publishTime":1767,"categories":1768,"tags":1769,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"类加载过程是怎样的？","jvm-class-loading",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:58.408526Z",[111],[],{"permalink":1771,"excerpt":1772,"lastModifyTime":1773,"phase":154},"\u002Farchives\u002Fjvm-class-loading","一、五个阶段 加载：通过类的全限定名获取二进制字节流，在内存中生成 Class 对象。 验证：校验字节码的合法性（魔数、版本、语义）。 准备：为类的静态变量分配内存并赋默认值（零值），final static 在编译期已赋值。 解析：把符号引用替换为直接引用。 初始化：执行 \u003Cclinit> 方法，","2026-09-16T09:13:36.695610Z",[1775],{"metadata":1776,"spec":1778,"status":1779,"postCount":73},{"name":111,"creationTimestamp":1687,"labels":1777},{"haloweb.section":91},{"displayName":1690,"slug":111,"cover":94,"description":1691,"priority":1692,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1694,"postCount":73,"visiblePostCount":73},{"metadata":1781,"spec":1784,"status":1791,"categories":1795},{"name":1782,"creationTimestamp":1783},"post-jvm-oom-types-66061da5","2026-09-13T10:00:58.521007Z",{"title":1785,"slug":1786,"cover":94,"excerpt":1787,"publishTime":1788,"categories":1789,"tags":1790,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"常见的 OOM 有哪些？","jvm-oom-types",{"raw":94,"autoGenerate":145},"2026-09-13T10:00:58.572152Z",[111],[],{"permalink":1792,"excerpt":1793,"lastModifyTime":1794,"phase":154},"\u002Farchives\u002Fjvm-oom-types","一、Java heap space 堆内存不足，对象太多或内存泄漏。排查：dump 堆快照，用 MAT 分析大对象\u002F泄漏点。 二、GC overhead limit exceeded GC 耗时过长（98% 时间用于 GC 且回收不到 2% 内存）。通常是堆太小或内存泄漏。 三、Java.lang.","2026-09-16T09:14:30.722962Z",[1796],{"metadata":1797,"spec":1799,"status":1800,"postCount":73},{"name":111,"creationTimestamp":1687,"labels":1798},{"haloweb.section":91},{"displayName":1690,"slug":111,"cover":94,"description":1691,"priority":1692,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1694,"postCount":73,"visiblePostCount":73},{"category":1802,"posts":1812},{"metadata":1803,"spec":1806,"status":1810,"postCount":73},{"name":112,"creationTimestamp":1804,"labels":1805},"2026-09-13T09:13:25.868986Z",{"haloweb.section":91},{"displayName":1807,"slug":112,"cover":94,"description":1808,"priority":1809,"hideFromList":96,"preventParentPostCascadeQuery":96},"计算机网络面试题","计算机网络面试题：TCP\u002FIP、HTTP\u002FHTTPS、握手挥手、DNS 与常见网络问题排查。",14,{"permalink":1811,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Fnetwork",[1813,1834,1855,1876,1897],{"metadata":1814,"spec":1817,"status":1824,"categories":1828},{"name":1815,"creationTimestamp":1816},"post-net-tcp-three-way-88b96e5c","2026-09-13T10:01:05.179293Z",{"title":1818,"slug":1819,"cover":94,"excerpt":1820,"publishTime":1821,"categories":1822,"tags":1823,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"TCP 三次握手过程？","net-tcp-three-way",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:05.250642Z",[112],[],{"permalink":1825,"excerpt":1826,"lastModifyTime":1827,"phase":154},"\u002Farchives\u002Fnet-tcp-three-way","一、过程 第一次：客户端发送 SYN=1, seq=x，进入 SYN_SENT 状态。 第二次：服务端回复 SYN=1, ACK=1, seq=y, ack=x+1，进入 SYN_RCVD 状态。 第三次：客户端回复 ACK=1, seq=x+1, ack=y+1，双方进入 ESTABLISHED ","2026-09-16T09:14:44.609162Z",[1829],{"metadata":1830,"spec":1832,"status":1833,"postCount":73},{"name":112,"creationTimestamp":1804,"labels":1831},{"haloweb.section":91},{"displayName":1807,"slug":112,"cover":94,"description":1808,"priority":1809,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1811,"postCount":73,"visiblePostCount":73},{"metadata":1835,"spec":1838,"status":1845,"categories":1849},{"name":1836,"creationTimestamp":1837},"post-net-tcp-four-way-bc1b2a69","2026-09-13T10:01:05.371016Z",{"title":1839,"slug":1840,"cover":94,"excerpt":1841,"publishTime":1842,"categories":1843,"tags":1844,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"TCP 四次挥手过程？","net-tcp-four-way",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:05.571824Z",[112],[],{"permalink":1846,"excerpt":1847,"lastModifyTime":1848,"phase":154},"\u002Farchives\u002Fnet-tcp-four-way","一、过程 客户端发 FIN=1, seq=u，进入 FIN_WAIT_1。 服务端回 ACK=1, ack=u+1，进入 CLOSE_WAIT；客户端进入 FIN_WAIT_2。 服务端发完数据后发 FIN=1, seq=w，进入 LAST_ACK。 客户端回 ACK=1, ack=w+1，进入 T","2026-09-16T09:14:45.072516Z",[1850],{"metadata":1851,"spec":1853,"status":1854,"postCount":73},{"name":112,"creationTimestamp":1804,"labels":1852},{"haloweb.section":91},{"displayName":1807,"slug":112,"cover":94,"description":1808,"priority":1809,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1811,"postCount":73,"visiblePostCount":73},{"metadata":1856,"spec":1859,"status":1866,"categories":1870},{"name":1857,"creationTimestamp":1858},"post-net-tcp-vs-udp-39b5d32e","2026-09-13T10:01:05.685781Z",{"title":1860,"slug":1861,"cover":94,"excerpt":1862,"publishTime":1863,"categories":1864,"tags":1865,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"TCP 和 UDP 的区别？","net-tcp-vs-udp",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:05.743404Z",[112],[],{"permalink":1867,"excerpt":1868,"lastModifyTime":1869,"phase":154},"\u002Farchives\u002Fnet-tcp-vs-udp","一、对比 维度 TCP UDP 连接 面向连接 无连接 可靠性 可靠 不可靠 顺序 保证 不保证 流量控制 有 无 拥塞控制 有 无 首部大小 20~60 字节 8 字节 性能 较低 较高 二、TCP 保证可靠的机制 序列号 + 确认应","2026-09-16T09:14:43.649091Z",[1871],{"metadata":1872,"spec":1874,"status":1875,"postCount":73},{"name":112,"creationTimestamp":1804,"labels":1873},{"haloweb.section":91},{"displayName":1807,"slug":112,"cover":94,"description":1808,"priority":1809,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1811,"postCount":73,"visiblePostCount":73},{"metadata":1877,"spec":1880,"status":1887,"categories":1891},{"name":1878,"creationTimestamp":1879},"post-net-http-https-ab8b6109","2026-09-13T10:01:05.852794Z",{"title":1881,"slug":1882,"cover":94,"excerpt":1883,"publishTime":1884,"categories":1885,"tags":1886,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"HTTP 和 HTTPS 的区别？","net-http-https",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:06.045966Z",[112],[],{"permalink":1888,"excerpt":1889,"lastModifyTime":1890,"phase":154},"\u002Farchives\u002Fnet-http-https","一、核心区别 HTTPS = HTTP + TLS\u002FSSL，在 HTTP 和 TCP 之间加了加密层。 二、对比 维度 HTTP HTTPS 端口 80 443 传输 明文 加密 证书 不需要 需要 CA 证书 安全 易被窃听\u002F篡改 机密性+完整性+身份认证 性能 较快 略慢（TLS 握手） 三、T","2026-09-16T09:14:46.033294Z",[1892],{"metadata":1893,"spec":1895,"status":1896,"postCount":73},{"name":112,"creationTimestamp":1804,"labels":1894},{"haloweb.section":91},{"displayName":1807,"slug":112,"cover":94,"description":1808,"priority":1809,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1811,"postCount":73,"visiblePostCount":73},{"metadata":1898,"spec":1901,"status":1908,"categories":1912},{"name":1899,"creationTimestamp":1900},"post-net-http-status-0d879b34","2026-09-13T10:01:06.196220Z",{"title":1902,"slug":1903,"cover":94,"excerpt":1904,"publishTime":1905,"categories":1906,"tags":1907,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"常见 HTTP 状态码？","net-http-status",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:06.253755Z",[112],[],{"permalink":1909,"excerpt":1910,"lastModifyTime":1911,"phase":154},"\u002Farchives\u002Fnet-http-status","一、1xx 信息 100 Continue：继续发送。 二、2xx 成功 200 OK：请求成功。 201 Created：资源创建成功。 204 No Content：成功但无响应体。 206 Partial Content：范围请求。 三、3xx 重定向 301 Moved Permanentl","2026-09-16T09:14:44.134667Z",[1913],{"metadata":1914,"spec":1916,"status":1917,"postCount":73},{"name":112,"creationTimestamp":1804,"labels":1915},{"haloweb.section":91},{"displayName":1807,"slug":112,"cover":94,"description":1808,"priority":1809,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1811,"postCount":73,"visiblePostCount":73},{"category":1919,"posts":1929},{"metadata":1920,"spec":1923,"status":1927,"postCount":73},{"name":113,"creationTimestamp":1921,"labels":1922},"2026-09-13T09:13:25.893081Z",{"haloweb.section":91},{"displayName":1924,"slug":113,"cover":94,"description":1925,"priority":1926,"hideFromList":96,"preventParentPostCascadeQuery":96},"操作系统面试题","操作系统面试题：进程与线程、内存管理、IO 模型、CPU 调度与同步原语。",15,{"permalink":1928,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Fos",[1930,1951,1972,1993,2014],{"metadata":1931,"spec":1934,"status":1941,"categories":1945},{"name":1932,"creationTimestamp":1933},"post-os-process-thread-afd2f460","2026-09-13T10:01:06.383471Z",{"title":1935,"slug":1936,"cover":94,"excerpt":1937,"publishTime":1938,"categories":1939,"tags":1940,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"进程和线程的区别？","os-process-thread",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:06.551909Z",[113],[],{"permalink":1942,"excerpt":1943,"lastModifyTime":1944,"phase":154},"\u002Farchives\u002Fos-process-thread","一、定义 进程：程序运行的实例，资源分配的基本单位，有独立地址空间。 线程：进程内的执行单元，CPU 调度的基本单位，共享进程资源。 二、对比 维度 进程 线程 资源 独立地址空间 共享进程资源 切换开销 大（切换页表、TLB） 小 通信 IPC（管道、消息队列、共享内存） 共享内存（需同步） 健壮","2026-09-16T09:14:46.493415Z",[1946],{"metadata":1947,"spec":1949,"status":1950,"postCount":73},{"name":113,"creationTimestamp":1921,"labels":1948},{"haloweb.section":91},{"displayName":1924,"slug":113,"cover":94,"description":1925,"priority":1926,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1928,"postCount":73,"visiblePostCount":73},{"metadata":1952,"spec":1955,"status":1962,"categories":1966},{"name":1953,"creationTimestamp":1954},"post-os-scheduler-be6008d8","2026-09-13T10:01:06.684412Z",{"title":1956,"slug":1957,"cover":94,"excerpt":1958,"publishTime":1959,"categories":1960,"tags":1961,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"进程调度算法有哪些？","os-scheduler",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:06.733759Z",[113],[],{"permalink":1963,"excerpt":1964,"lastModifyTime":1965,"phase":154},"\u002Farchives\u002Fos-scheduler","一、先来先服务（FCFS） 按到达顺序执行，非抢占。简单但短作业可能等待很久。 二、短作业优先（SJF） 预估运行时间短的先执行。平均等待时间最短，但长作业可能饥饿。 三、时间片轮转（RR） 每个进程分配一个时间片，用完就切换。适合交互式系统，响应快。 四、优先级调度 高优先级进程先执行。可抢占或非","2026-09-16T09:15:11.437318Z",[1967],{"metadata":1968,"spec":1970,"status":1971,"postCount":73},{"name":113,"creationTimestamp":1921,"labels":1969},{"haloweb.section":91},{"displayName":1924,"slug":113,"cover":94,"description":1925,"priority":1926,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1928,"postCount":73,"visiblePostCount":73},{"metadata":1973,"spec":1976,"status":1983,"categories":1987},{"name":1974,"creationTimestamp":1975},"post-os-deadlock-f7833246","2026-09-13T10:01:06.879036Z",{"title":1977,"slug":1978,"cover":94,"excerpt":1979,"publishTime":1980,"categories":1981,"tags":1982,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"什么是死锁？如何避免？","os-deadlock",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:06.930093Z",[113],[],{"permalink":1984,"excerpt":1985,"lastModifyTime":1986,"phase":154},"\u002Farchives\u002Fos-deadlock","一、四个必要条件 互斥：资源同一时间只能被一个进程使用。 持有并等待：进程持有资源同时等待其他资源。 不可剥夺：已获得的资源不能被强制夺走。 循环等待：进程间形成循环等待链。 二、预防 破坏四个条件之一： - 破坏互斥：难（有些资源必须互斥）。 - 破坏持有并等待：一次性申请所有资源。 - 破坏不可","2026-09-16T09:15:11.876156Z",[1988],{"metadata":1989,"spec":1991,"status":1992,"postCount":73},{"name":113,"creationTimestamp":1921,"labels":1990},{"haloweb.section":91},{"displayName":1924,"slug":113,"cover":94,"description":1925,"priority":1926,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1928,"postCount":73,"visiblePostCount":73},{"metadata":1994,"spec":1997,"status":2004,"categories":2008},{"name":1995,"creationTimestamp":1996},"post-os-memory-manage-c9ef3f72","2026-09-13T10:01:07.077926Z",{"title":1998,"slug":1999,"cover":94,"excerpt":2000,"publishTime":2001,"categories":2002,"tags":2003,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"操作系统的内存管理？","os-memory-manage",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:07.126511Z",[113],[],{"permalink":2005,"excerpt":2006,"lastModifyTime":2007,"phase":154},"\u002Farchives\u002Fos-memory-manage","一、虚拟内存 每个进程有独立虚拟地址空间，通过页表映射到物理内存。进程以为自己独占内存。 二、分页 内存分成固定大小的页（通常 4KB），虚拟页映射到物理页帧。 页表：记录虚拟页到物理页的映射。 TLB：页表缓存，加速地址翻译。 缺页中断：访问的页不在内存，从磁盘加载。 三、分段 按逻辑单位分段（代","2026-09-16T09:15:12.350048Z",[2009],{"metadata":2010,"spec":2012,"status":2013,"postCount":73},{"name":113,"creationTimestamp":1921,"labels":2011},{"haloweb.section":91},{"displayName":1924,"slug":113,"cover":94,"description":1925,"priority":1926,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1928,"postCount":73,"visiblePostCount":73},{"metadata":2015,"spec":2018,"status":2025,"categories":2029},{"name":2016,"creationTimestamp":2017},"post-os-io-multiplexing-5e8493ea","2026-09-13T10:01:07.249312Z",{"title":2019,"slug":2020,"cover":94,"excerpt":2021,"publishTime":2022,"categories":2023,"tags":2024,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"什么是 I\u002FO 多路复用？","os-io-multiplexing",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:07.426950Z",[113],[],{"permalink":2026,"excerpt":2027,"lastModifyTime":2028,"phase":154},"\u002Farchives\u002Fos-io-multiplexing","一、定义 单个线程通过系统调用同时监听多个文件描述符，哪个就绪就处理哪个，避免阻塞在单个 I\u002FO 上。 二、select select(maxfd, &readfds, &writefds, &exceptfds, &timeout);\n 位图存储 fd，有最大数量限制（1024）。 每次调用都要把","2026-09-16T09:15:12.821909Z",[2030],{"metadata":2031,"spec":2033,"status":2034,"postCount":73},{"name":113,"creationTimestamp":1921,"labels":2032},{"haloweb.section":91},{"displayName":1924,"slug":113,"cover":94,"description":1925,"priority":1926,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":1928,"postCount":73,"visiblePostCount":73},{"category":2036,"posts":2046},{"metadata":2037,"spec":2040,"status":2044,"postCount":73},{"name":114,"creationTimestamp":2038,"labels":2039},"2026-09-13T09:13:25.917842Z",{"haloweb.section":91},{"displayName":2041,"slug":114,"cover":94,"description":2042,"priority":2043,"hideFromList":96,"preventParentPostCascadeQuery":96},"Dubbo 面试题","Dubbo 面试题：RPC 原理、注册中心、负载均衡、SPI 扩展与服务治理机制。",16,{"permalink":2045,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Fdubbo",[2047,2068,2089,2110,2131],{"metadata":2048,"spec":2051,"status":2058,"categories":2062},{"name":2049,"creationTimestamp":2050},"post-dubbo-architecture-9ce704df","2026-09-13T10:01:10.788551Z",{"title":2052,"slug":2053,"cover":94,"excerpt":2054,"publishTime":2055,"categories":2056,"tags":2057,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Dubbo 的整体架构？","dubbo-architecture",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:10.836412Z",[114],[],{"permalink":2059,"excerpt":2060,"lastModifyTime":2061,"phase":154},"\u002Farchives\u002Fdubbo-architecture","一、核心角色 Provider：服务提供者，暴露服务。 Consumer：服务消费者，调用远程服务。 Registry：注册中心，服务注册与发现。 Monitor：监控中心，统计调用次数和耗时。 Container：服务运行容器。 二、调用流程 Provider 启动时向 Registry 注册服务","2026-09-16T09:15:43.605509Z",[2063],{"metadata":2064,"spec":2066,"status":2067,"postCount":73},{"name":114,"creationTimestamp":2038,"labels":2065},{"haloweb.section":91},{"displayName":2041,"slug":114,"cover":94,"description":2042,"priority":2043,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2045,"postCount":73,"visiblePostCount":73},{"metadata":2069,"spec":2072,"status":2079,"categories":2083},{"name":2070,"creationTimestamp":2071},"post-dubbo-loadbalance-2e6422fe","2026-09-13T10:01:10.977842Z",{"title":2073,"slug":2074,"cover":94,"excerpt":2075,"publishTime":2076,"categories":2077,"tags":2078,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Dubbo 的负载均衡策略？","dubbo-loadbalance",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:11.023987Z",[114],[],{"permalink":2080,"excerpt":2081,"lastModifyTime":2082,"phase":154},"\u002Farchives\u002Fdubbo-loadbalance","一、四种策略 Random（默认）：随机，按权重加权随机。 RoundRobin：轮询，按权重轮询，慢的 Provider 会累积请求。 LeastActive：最少活跃调用，慢的 Provider 收到更少请求。 ConsistentHash：一致性哈希，相同参数请求到同一 Provider。 二","2026-09-16T09:15:42.198255Z",[2084],{"metadata":2085,"spec":2087,"status":2088,"postCount":73},{"name":114,"creationTimestamp":2038,"labels":2086},{"haloweb.section":91},{"displayName":2041,"slug":114,"cover":94,"description":2042,"priority":2043,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2045,"postCount":73,"visiblePostCount":73},{"metadata":2090,"spec":2093,"status":2100,"categories":2104},{"name":2091,"creationTimestamp":2092},"post-dubbo-spi-053de0a7","2026-09-13T10:01:11.161638Z",{"title":2094,"slug":2095,"cover":94,"excerpt":2096,"publishTime":2097,"categories":2098,"tags":2099,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Dubbo 的 SPI 机制？","dubbo-spi",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:11.215283Z",[114],[],{"permalink":2101,"excerpt":2102,"lastModifyTime":2103,"phase":154},"\u002Farchives\u002Fdubbo-spi","一、SPI 定义 Service Provider Interface，服务提供接口。Java 有自带 SPI，Dubbo 对其增强。 二、Dubbo SPI 优势 按需加载，不一次性加载所有实现。 支持自适应扩展（@Adaptive），运行时动态选择实现。 支持自动包装（Wrapper），AOP ","2026-09-16T09:15:41.272158Z",[2105],{"metadata":2106,"spec":2108,"status":2109,"postCount":73},{"name":114,"creationTimestamp":2038,"labels":2107},{"haloweb.section":91},{"displayName":2041,"slug":114,"cover":94,"description":2042,"priority":2043,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2045,"postCount":73,"visiblePostCount":73},{"metadata":2111,"spec":2114,"status":2121,"categories":2125},{"name":2112,"creationTimestamp":2113},"post-dubbo-rpc-2946497d","2026-09-13T10:01:11.371736Z",{"title":2115,"slug":2116,"cover":94,"excerpt":2117,"publishTime":2118,"categories":2119,"tags":2120,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Dubbo 的 RPC 调用过程？","dubbo-rpc",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:11.419823Z",[114],[],{"permalink":2122,"excerpt":2123,"lastModifyTime":2124,"phase":154},"\u002Farchives\u002Fdubbo-rpc","一、代理层 Consumer 调用接口方法，实际调用的是代理对象（JDK 动态代理或 Javassist）。 二、路由层 Cluster：集群容错，处理调用失败。 Directory：管理 Provider 列表。 Router：根据路由规则过滤 Provider。 LoadBalance：从 Pr","2026-09-16T09:15:45.125834Z",[2126],{"metadata":2127,"spec":2129,"status":2130,"postCount":73},{"name":114,"creationTimestamp":2038,"labels":2128},{"haloweb.section":91},{"displayName":2041,"slug":114,"cover":94,"description":2042,"priority":2043,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2045,"postCount":73,"visiblePostCount":73},{"metadata":2132,"spec":2135,"status":2142,"categories":2146},{"name":2133,"creationTimestamp":2134},"post-dubbo-vs-feign-492bd570","2026-09-13T10:01:11.561540Z",{"title":2136,"slug":2137,"cover":94,"excerpt":2138,"publishTime":2139,"categories":2140,"tags":2141,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Dubbo 和 OpenFeign 的区别？","dubbo-vs-feign",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:11.608721Z",[114],[],{"permalink":2143,"excerpt":2144,"lastModifyTime":2145,"phase":154},"\u002Farchives\u002Fdubbo-vs-feign","一、对比 维度 Dubbo OpenFeign 协议 多协议（dubbo 默认） HTTP 性能 高（二进制协议） 较低（HTTP+JSON） 服务治理 完善（路由、熔断、限流） 需配合 Sentinel 注册中心 必需 必需 语言 Java 为主 跨语言（HTTP） 适用 内部服务调用 内外通用 ","2026-09-16T09:15:44.673817Z",[2147],{"metadata":2148,"spec":2150,"status":2151,"postCount":73},{"name":114,"creationTimestamp":2038,"labels":2149},{"haloweb.section":91},{"displayName":2041,"slug":114,"cover":94,"description":2042,"priority":2043,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2045,"postCount":73,"visiblePostCount":73},{"category":2153,"posts":2163},{"metadata":2154,"spec":2157,"status":2161,"postCount":73},{"name":115,"creationTimestamp":2155,"labels":2156},"2026-09-13T09:13:25.943986Z",{"haloweb.section":91},{"displayName":2158,"slug":115,"cover":94,"description":2159,"priority":2160,"hideFromList":96,"preventParentPostCascadeQuery":96},"RAG 面试题","RAG 检索增强生成面试题：向量检索、召回与重排、知识库构建、效果评测与常见坑。",17,{"permalink":2162,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Frag",[2164,2185,2206,2227,2248],{"metadata":2165,"spec":2168,"status":2175,"categories":2179},{"name":2166,"creationTimestamp":2167},"post-rag-what-c4de36f1","2026-09-13T10:01:16.820767Z",{"title":2169,"slug":2170,"cover":94,"excerpt":2171,"publishTime":2172,"categories":2173,"tags":2174,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"什么是 RAG？","rag-what",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:16.868881Z",[115],[],{"permalink":2176,"excerpt":2177,"lastModifyTime":2178,"phase":154},"\u002Farchives\u002Frag-what","一、定义 RAG（Retrieval-Augmented Generation，检索增强生成）把外部知识检索和大语言模型生成结合起来。先从知识库检索相关文档，再让 LLM 基于检索结果生成回答。 二、解决的问题 LLM 知识截止，不知道最新信息。 LLM 幻觉，编造内容。 LLM 不知道企业私有知识","2026-09-16T09:16:45.934790Z",[2180],{"metadata":2181,"spec":2183,"status":2184,"postCount":73},{"name":115,"creationTimestamp":2155,"labels":2182},{"haloweb.section":91},{"displayName":2158,"slug":115,"cover":94,"description":2159,"priority":2160,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2162,"postCount":73,"visiblePostCount":73},{"metadata":2186,"spec":2189,"status":2196,"categories":2200},{"name":2187,"creationTimestamp":2188},"post-rag-embedding-027aa771","2026-09-13T10:01:16.978069Z",{"title":2190,"slug":2191,"cover":94,"excerpt":2192,"publishTime":2193,"categories":2194,"tags":2195,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"RAG 中的 Embedding 和向量数据库？","rag-embedding",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:17.022874Z",[115],[],{"permalink":2197,"excerpt":2198,"lastModifyTime":2199,"phase":154},"\u002Farchives\u002Frag-embedding","一、Embedding（嵌入） 把文本转换为高维向量（如 768\u002F1024 维），语义相近的文本向量距离近。 二、向量数据库 专门存储和检索向量的数据库，支持相似性搜索。 Milvus：开源，高性能，分布式。 Pinecone：云服务。 Weaviate：开源，支持混合检索。 Chroma：轻量，适","2026-09-16T09:16:46.368492Z",[2201],{"metadata":2202,"spec":2204,"status":2205,"postCount":73},{"name":115,"creationTimestamp":2155,"labels":2203},{"haloweb.section":91},{"displayName":2158,"slug":115,"cover":94,"description":2159,"priority":2160,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2162,"postCount":73,"visiblePostCount":73},{"metadata":2207,"spec":2210,"status":2217,"categories":2221},{"name":2208,"creationTimestamp":2209},"post-rag-chunking-bbf97db4","2026-09-13T10:01:17.143825Z",{"title":2211,"slug":2212,"cover":94,"excerpt":2213,"publishTime":2214,"categories":2215,"tags":2216,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"RAG 中的文档分块策略？","rag-chunking",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:17.186951Z",[115],[],{"permalink":2218,"excerpt":2219,"lastModifyTime":2220,"phase":154},"\u002Farchives\u002Frag-chunking","一、为什么要分块 文档太长无法直接向量化（Embedding 有 token 限制），且 LLM 上下文有限。分块后每块独立检索。 二、分块方法 1. 固定长度分块 按 token 数切分，如每块 500 token，重叠 50 token。 - 优点：简单。 - 缺点：可能切断语义。 2. 按结构","2026-09-16T09:16:42.573515Z",[2222],{"metadata":2223,"spec":2225,"status":2226,"postCount":73},{"name":115,"creationTimestamp":2155,"labels":2224},{"haloweb.section":91},{"displayName":2158,"slug":115,"cover":94,"description":2159,"priority":2160,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2162,"postCount":73,"visiblePostCount":73},{"metadata":2228,"spec":2231,"status":2238,"categories":2242},{"name":2229,"creationTimestamp":2230},"post-rag-evaluation-3343ec81","2026-09-13T10:01:17.338928Z",{"title":2232,"slug":2233,"cover":94,"excerpt":2234,"publishTime":2235,"categories":2236,"tags":2237,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"如何评估 RAG 系统的效果？","rag-evaluation",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:17.382544Z",[115],[],{"permalink":2239,"excerpt":2240,"lastModifyTime":2241,"phase":154},"\u002Farchives\u002Frag-evaluation","一、评估维度 检索质量：检索到的文档是否相关。 生成质量：回答是否准确、完整、流畅。 端到端效果：整体回答是否满足用户。 二、检索评估指标 Recall（召回率）：相关文档中被检索到的比例。 Precision（精确率）：检索到的文档中相关的比例。 MRR：第一个相关文档的排名倒数。 NDCG：考虑","2026-09-16T09:17:11.351718Z",[2243],{"metadata":2244,"spec":2246,"status":2247,"postCount":73},{"name":115,"creationTimestamp":2155,"labels":2245},{"haloweb.section":91},{"displayName":2158,"slug":115,"cover":94,"description":2159,"priority":2160,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2162,"postCount":73,"visiblePostCount":73},{"metadata":2249,"spec":2252,"status":2259,"categories":2263},{"name":2250,"creationTimestamp":2251},"post-rag-optimize-3be551ba","2026-09-13T10:01:17.497938Z",{"title":2253,"slug":2254,"cover":94,"excerpt":2255,"publishTime":2256,"categories":2257,"tags":2258,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"RAG 系统的优化手段？","rag-optimize",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:17.709819Z",[115],[],{"permalink":2260,"excerpt":2261,"lastModifyTime":2262,"phase":154},"\u002Farchives\u002Frag-optimize","一、检索优化 分块优化：合理的块大小和重叠。 Embedding 优化：用更适合的模型，微调。 混合检索：向量 + 关键词，提升召回。 重排（Rerank）：用 Cross-Encoder 对检索结果重排序，提升精度。 查询改写：用 LLM 改写用户问题，提升检索效果。 多查询：生成多个相关问题分别","2026-09-16T09:16:46.845496Z",[2264],{"metadata":2265,"spec":2267,"status":2268,"postCount":73},{"name":115,"creationTimestamp":2155,"labels":2266},{"haloweb.section":91},{"displayName":2158,"slug":115,"cover":94,"description":2159,"priority":2160,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2162,"postCount":73,"visiblePostCount":73},{"category":2270,"posts":2280},{"metadata":2271,"spec":2274,"status":2278,"postCount":73},{"name":116,"creationTimestamp":2272,"labels":2273},"2026-09-13T09:13:25.972430Z",{"haloweb.section":91},{"displayName":2275,"slug":116,"cover":94,"description":2276,"priority":2277,"hideFromList":96,"preventParentPostCascadeQuery":96},"AI Agent 面试题","AI Agent 面试题：智能体架构、工具调用、任务规划、记忆机制与多智能体协作。",18,{"permalink":2279,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Fai-agent",[2281,2302,2323,2344,2365],{"metadata":2282,"spec":2285,"status":2292,"categories":2296},{"name":2283,"creationTimestamp":2284},"post-agent-what-d43685b5","2026-09-13T10:01:17.835540Z",{"title":2286,"slug":2287,"cover":94,"excerpt":2288,"publishTime":2289,"categories":2290,"tags":2291,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"什么是 AI Agent？","agent-what",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:17.878824Z",[116],[],{"permalink":2293,"excerpt":2294,"lastModifyTime":2295,"phase":154},"\u002Farchives\u002Fagent-what","一、定义 AI Agent 是能感知环境、自主决策并执行动作的智能体。它能基于目标，自主规划、调用工具、执行任务，而不仅仅是回答问题。 二、核心能力 感知：理解用户输入和环境状态。 规划：把目标拆解为步骤。 记忆：短期（对话上下文）和长期（向量库）记忆。 工具调用：调用搜索、代码执行、API 等工具","2026-09-16T09:17:11.805159Z",[2297],{"metadata":2298,"spec":2300,"status":2301,"postCount":73},{"name":116,"creationTimestamp":2272,"labels":2299},{"haloweb.section":91},{"displayName":2275,"slug":116,"cover":94,"description":2276,"priority":2277,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2279,"postCount":73,"visiblePostCount":73},{"metadata":2303,"spec":2306,"status":2313,"categories":2317},{"name":2304,"creationTimestamp":2305},"post-agent-react-f2f15e6c","2026-09-13T10:01:18.038102Z",{"title":2307,"slug":2308,"cover":94,"excerpt":2309,"publishTime":2310,"categories":2311,"tags":2312,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"ReAct 模式是什么？","agent-react",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:18.084028Z",[116],[],{"permalink":2314,"excerpt":2315,"lastModifyTime":2316,"phase":154},"\u002Farchives\u002Fagent-react","一、定义 ReAct = Reasoning + Acting，是 Agent 的经典工作模式。交替进行推理和行动。 二、流程 Thought（思考）：分析当前状态，决定下一步。 Action（行动）：调用工具或执行操作。 Observation（观察）：获取执行结果。 循环 1-3，直到任务完成。","2026-09-16T09:17:12.241046Z",[2318],{"metadata":2319,"spec":2321,"status":2322,"postCount":73},{"name":116,"creationTimestamp":2272,"labels":2320},{"haloweb.section":91},{"displayName":2275,"slug":116,"cover":94,"description":2276,"priority":2277,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2279,"postCount":73,"visiblePostCount":73},{"metadata":2324,"spec":2327,"status":2334,"categories":2338},{"name":2325,"creationTimestamp":2326},"post-agent-tools-15bf488c","2026-09-13T10:01:18.248931Z",{"title":2328,"slug":2329,"cover":94,"excerpt":2330,"publishTime":2331,"categories":2332,"tags":2333,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"AI Agent 如何调用工具？","agent-tools",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:18.294818Z",[116],[],{"permalink":2335,"excerpt":2336,"lastModifyTime":2337,"phase":154},"\u002Farchives\u002Fagent-tools","一、Function Calling LLM 支持的函数调用能力。开发者定义工具 schema（名称、参数、描述），LLM 决定是否调用及参数，返回结构化 JSON。 二、流程 定义工具：名称、描述、参数 JSON Schema。 用户提问，LLM 判断需要调用工具。 LLM 返回工具名和参数。 应","2026-09-16T09:17:12.839579Z",[2339],{"metadata":2340,"spec":2342,"status":2343,"postCount":73},{"name":116,"creationTimestamp":2272,"labels":2341},{"haloweb.section":91},{"displayName":2275,"slug":116,"cover":94,"description":2276,"priority":2277,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2279,"postCount":73,"visiblePostCount":73},{"metadata":2345,"spec":2348,"status":2355,"categories":2359},{"name":2346,"creationTimestamp":2347},"post-agent-memory-1d1c7ff2","2026-09-13T10:01:18.406204Z",{"title":2349,"slug":2350,"cover":94,"excerpt":2351,"publishTime":2352,"categories":2353,"tags":2354,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"AI Agent 的记忆机制？","agent-memory",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:18.453521Z",[116],[],{"permalink":2356,"excerpt":2357,"lastModifyTime":2358,"phase":154},"\u002Farchives\u002Fagent-memory","一、短期记忆 当前对话上下文。 受 LLM 上下文窗口限制。 太长会丢失早期信息，浪费 token。 二、长期记忆 向量数据库存储历史交互、知识。 检索相关记忆注入上下文。 支持跨会话记忆。 三、记忆类型 情景记忆：具体的交互经历。 语义记忆：事实和知识。 程序记忆：技能和流程。 四、记忆管理 写入","2026-09-16T09:17:13.287981Z",[2360],{"metadata":2361,"spec":2363,"status":2364,"postCount":73},{"name":116,"creationTimestamp":2272,"labels":2362},{"haloweb.section":91},{"displayName":2275,"slug":116,"cover":94,"description":2276,"priority":2277,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2279,"postCount":73,"visiblePostCount":73},{"metadata":2366,"spec":2369,"status":2376,"categories":2380},{"name":2367,"creationTimestamp":2368},"post-agent-framework-211695a1","2026-09-13T10:01:18.600522Z",{"title":2370,"slug":2371,"cover":94,"excerpt":2372,"publishTime":2373,"categories":2374,"tags":2375,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"主流的 AI Agent 框架有哪些？","agent-framework",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:18.665516Z",[116],[],{"permalink":2377,"excerpt":2378,"lastModifyTime":2379,"phase":154},"\u002Farchives\u002Fagent-framework","一、LangChain \u002F LangGraph LangChain：LLM 应用编排，支持工具、记忆、RAG。 LangGraph：基于图的 Agent 编排，适合复杂多步任务。 生态最丰富，社区活跃。 二、AutoGen 微软出品，多 Agent 对话框架。 支持多个 Agent 协作，角色灵活。","2026-09-16T09:33:09.815089Z",[2381],{"metadata":2382,"spec":2384,"status":2385,"postCount":73},{"name":116,"creationTimestamp":2272,"labels":2383},{"haloweb.section":91},{"displayName":2275,"slug":116,"cover":94,"description":2276,"priority":2277,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2279,"postCount":73,"visiblePostCount":73},{"category":2387,"posts":2397},{"metadata":2388,"spec":2391,"status":2395,"postCount":73},{"name":117,"creationTimestamp":2389,"labels":2390},"2026-09-13T09:13:25.996566Z",{"haloweb.section":91},{"displayName":2392,"slug":117,"cover":94,"description":2393,"priority":2394,"hideFromList":96,"preventParentPostCascadeQuery":96},"Netty 面试题","Netty 面试题：Reactor 线程模型、ByteBuf、零拷贝、编解码与常见内存泄漏排查。",19,{"permalink":2396,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Fnetty",[2398,2419,2440,2461,2482],{"metadata":2399,"spec":2402,"status":2409,"categories":2413},{"name":2400,"creationTimestamp":2401},"post-netty-reactor-452c619b","2026-09-13T10:01:11.735905Z",{"title":2403,"slug":2404,"cover":94,"excerpt":2405,"publishTime":2406,"categories":2407,"tags":2408,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Netty 的 Reactor 线程模型？","netty-reactor",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:11.908097Z",[117],[],{"permalink":2410,"excerpt":2411,"lastModifyTime":2412,"phase":154},"\u002Farchives\u002Fnetty-reactor","一、Reactor 模式 基于事件驱动，I\u002FO 多路复用监听多个连接，事件就绪后分发给处理器。 二、Netty 三种模型 单线程 Reactor：一个线程处理所有连接的 accept 和 I\u002FO，简单但不适合高并发。 多线程 Reactor：一个 Acceptor 线程接收连接，I\u002FO 由线程池处理","2026-09-16T09:15:45.558022Z",[2414],{"metadata":2415,"spec":2417,"status":2418,"postCount":73},{"name":117,"creationTimestamp":2389,"labels":2416},{"haloweb.section":91},{"displayName":2392,"slug":117,"cover":94,"description":2393,"priority":2394,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2396,"postCount":73,"visiblePostCount":73},{"metadata":2420,"spec":2423,"status":2430,"categories":2434},{"name":2421,"creationTimestamp":2422},"post-netty-pipeline-7fcc13c5","2026-09-13T10:01:12.057563Z",{"title":2424,"slug":2425,"cover":94,"excerpt":2426,"publishTime":2427,"categories":2428,"tags":2429,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Netty 的 ChannelPipeline 机制？","netty-pipeline",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:12.104621Z",[117],[],{"permalink":2431,"excerpt":2432,"lastModifyTime":2433,"phase":154},"\u002Farchives\u002Fnetty-pipeline","一、定义 每个 Channel 有一个 Pipeline，由多个 ChannelHandler 组成，形成责任链。入站和出站事件在 Pipeline 中传播。 二、入站和出站 InboundHandler：处理入站事件（读、连接建立等），从 head 向 tail 传播。 OutboundHandl","2026-09-16T09:16:10.087911Z",[2435],{"metadata":2436,"spec":2438,"status":2439,"postCount":73},{"name":117,"creationTimestamp":2389,"labels":2437},{"haloweb.section":91},{"displayName":2392,"slug":117,"cover":94,"description":2393,"priority":2394,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2396,"postCount":73,"visiblePostCount":73},{"metadata":2441,"spec":2444,"status":2451,"categories":2455},{"name":2442,"creationTimestamp":2443},"post-netty-bytebuf-9e659725","2026-09-13T10:01:12.219331Z",{"title":2445,"slug":2446,"cover":94,"excerpt":2447,"publishTime":2448,"categories":2449,"tags":2450,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Netty 的 ByteBuf 设计？","netty-bytebuf",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:12.269412Z",[117],[],{"permalink":2452,"excerpt":2453,"lastModifyTime":2454,"phase":154},"\u002Farchives\u002Fnetty-bytebuf","一、与 ByteBuffer 对比 JDK ByteBuffer 只有一个 position，读写切换需 flip()，易出错。 ByteBuf 有 readerIndex 和 writerIndex 两个指针，读写分离，无需 flip。 二、核心方法 readXxx() \u002F writeXxx()：","2026-09-16T09:15:44.072779Z",[2456],{"metadata":2457,"spec":2459,"status":2460,"postCount":73},{"name":117,"creationTimestamp":2389,"labels":2458},{"haloweb.section":91},{"displayName":2392,"slug":117,"cover":94,"description":2393,"priority":2394,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2396,"postCount":73,"visiblePostCount":73},{"metadata":2462,"spec":2465,"status":2472,"categories":2476},{"name":2463,"creationTimestamp":2464},"post-netty-sticky-packet-db78caff","2026-09-13T10:01:12.394145Z",{"title":2466,"slug":2467,"cover":94,"excerpt":2468,"publishTime":2469,"categories":2470,"tags":2471,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Netty 如何解决粘包拆包？","netty-sticky-packet",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:12.445874Z",[117],[],{"permalink":2473,"excerpt":2474,"lastModifyTime":2475,"phase":154},"\u002Farchives\u002Fnetty-sticky-packet","一、问题 TCP 是字节流，没有消息边界，多个请求可能粘在一起（粘包），一个请求可能被拆分（拆包）。 二、解决方案 固定长度：FixedLengthFrameDecoder，每条消息固定长度。 特殊分隔符：DelimiterBasedFrameDecoder，按换行符等分隔。 长度字段：Length","2026-09-16T09:16:10.566524Z",[2477],{"metadata":2478,"spec":2480,"status":2481,"postCount":73},{"name":117,"creationTimestamp":2389,"labels":2479},{"haloweb.section":91},{"displayName":2392,"slug":117,"cover":94,"description":2393,"priority":2394,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2396,"postCount":73,"visiblePostCount":73},{"metadata":2483,"spec":2486,"status":2493,"categories":2497},{"name":2484,"creationTimestamp":2485},"post-netty-heartbeat-12b221d2","2026-09-13T10:01:12.589477Z",{"title":2487,"slug":2488,"cover":94,"excerpt":2489,"publishTime":2490,"categories":2491,"tags":2492,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Netty 如何实现心跳检测？","netty-heartbeat",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:12.638155Z",[117],[],{"permalink":2494,"excerpt":2495,"lastModifyTime":2496,"phase":154},"\u002Farchives\u002Fnetty-heartbeat","一、IdleStateHandler Netty 提供 IdleStateHandler 检测空闲状态。 ch.pipeline().addLast(new IdleStateHandler(5, 0, 0, TimeUnit.SECONDS));\n 三个参数：读空闲时间、写空闲时间、所有空闲时间。","2026-09-16T09:16:11.001714Z",[2498],{"metadata":2499,"spec":2501,"status":2502,"postCount":73},{"name":117,"creationTimestamp":2389,"labels":2500},{"haloweb.section":91},{"displayName":2392,"slug":117,"cover":94,"description":2393,"priority":2394,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2396,"postCount":73,"visiblePostCount":73},{"category":2504,"posts":2514},{"metadata":2505,"spec":2508,"status":2512,"postCount":73},{"name":118,"creationTimestamp":2506,"labels":2507},"2026-09-13T09:13:26.020943Z",{"haloweb.section":91},{"displayName":2509,"slug":118,"cover":94,"description":2510,"priority":2511,"hideFromList":96,"preventParentPostCascadeQuery":96},"分库分表面试题","分库分表面试题：分片策略、路由扩容、分布式主键、跨片查询与数据一致性方案。",20,{"permalink":2513,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Fsharding",[2515,2536,2557,2578,2599],{"metadata":2516,"spec":2519,"status":2526,"categories":2530},{"name":2517,"creationTimestamp":2518},"post-sharding-strategy-f725fb51","2026-09-13T10:01:12.754097Z",{"title":2520,"slug":2521,"cover":94,"excerpt":2522,"publishTime":2523,"categories":2524,"tags":2525,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"分库分表有哪些策略？","sharding-strategy",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:12.803252Z",[118],[],{"permalink":2527,"excerpt":2528,"lastModifyTime":2529,"phase":154},"\u002Farchives\u002Fsharding-strategy","一、垂直拆分 垂直分库：按业务拆分库，如用户库、订单库、商品库。 垂直分表：按字段拆分表，如主表存常用字段，扩展表存大字段。 解决：单库压力、单表字段过多。 二、水平拆分 水平分库：同一张表数据按规则分到多个库。 水平分表：同一张表数据按规则分到多张表。 解决：单表数据量过大。 三、分片规则 范围：","2026-09-16T09:16:35.972485Z",[2531],{"metadata":2532,"spec":2534,"status":2535,"postCount":73},{"name":118,"creationTimestamp":2506,"labels":2533},{"haloweb.section":91},{"displayName":2509,"slug":118,"cover":94,"description":2510,"priority":2511,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2513,"postCount":73,"visiblePostCount":73},{"metadata":2537,"spec":2540,"status":2547,"categories":2551},{"name":2538,"creationTimestamp":2539},"post-sharding-key-7d06fbdb","2026-09-13T10:01:12.933408Z",{"title":2541,"slug":2542,"cover":94,"excerpt":2543,"publishTime":2544,"categories":2545,"tags":2546,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"如何选择分片键？","sharding-key",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:12.988421Z",[118],[],{"permalink":2548,"excerpt":2549,"lastModifyTime":2550,"phase":154},"\u002Farchives\u002Fsharding-key","一、选择原则 查询频率高：最常用的查询条件字段，如 user_id、order_id。 分布均匀：避免数据倾斜，如不要用性别（只有两个值）。 业务关联：关联表用相同分片键，减少跨库 join。 不可变：分片键值一旦确定不能改。 二、常见分片键 用户 ID：用户相关数据，如订单按 user_id 分片","2026-09-16T09:16:36.607917Z",[2552],{"metadata":2553,"spec":2555,"status":2556,"postCount":73},{"name":118,"creationTimestamp":2506,"labels":2554},{"haloweb.section":91},{"displayName":2509,"slug":118,"cover":94,"description":2510,"priority":2511,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2513,"postCount":73,"visiblePostCount":73},{"metadata":2558,"spec":2561,"status":2568,"categories":2572},{"name":2559,"creationTimestamp":2560},"post-sharding-id-gen-2d3d5a55","2026-09-13T10:01:13.134819Z",{"title":2562,"slug":2563,"cover":94,"excerpt":2564,"publishTime":2565,"categories":2566,"tags":2567,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"分布式 ID 生成方案有哪些？","sharding-id-gen",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:13.220993Z",[118],[],{"permalink":2569,"excerpt":2570,"lastModifyTime":2571,"phase":154},"\u002Farchives\u002Fsharding-id-gen","一、UUID 优点：本地生成，无网络开销，唯一。 缺点：无序，索引效率低；太长。 二、数据库自增 优点：简单，有序。 缺点：单库瓶颈；分库后不全局唯一。 三、号段模式 从数据库批量获取 ID 段（如 1-1000），在内存中使用。 优点：性能高，减少数据库压力。 缺点：服务重启可能断号。 四、Sno","2026-09-16T09:16:35.488658Z",[2573],{"metadata":2574,"spec":2576,"status":2577,"postCount":73},{"name":118,"creationTimestamp":2506,"labels":2575},{"haloweb.section":91},{"displayName":2509,"slug":118,"cover":94,"description":2510,"priority":2511,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2513,"postCount":73,"visiblePostCount":73},{"metadata":2579,"spec":2582,"status":2589,"categories":2593},{"name":2580,"creationTimestamp":2581},"post-sharding-migration-5d5ab7fd","2026-09-13T10:01:13.348573Z",{"title":2583,"slug":2584,"cover":94,"excerpt":2585,"publishTime":2586,"categories":2587,"tags":2588,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"分库分表扩容如何平滑迁移？","sharding-migration",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:13.392795Z",[118],[],{"permalink":2590,"excerpt":2591,"lastModifyTime":2592,"phase":154},"\u002Farchives\u002Fsharding-migration","一、取模扩容问题 user_id % 4 改为 % 8，大部分数据需要迁移。 二、方案一：停机迁移 停机，写脚本把数据按新规则重新分配。 简单但有停机时间。 三、方案二：双写 + 迁移 新数据同时写旧分片和新分片。 后台把旧数据迁移到新分片。 校验一致后，切读到新分片。 停写旧分片。 - 不停机但复","2026-09-16T09:16:38.181057Z",[2594],{"metadata":2595,"spec":2597,"status":2598,"postCount":73},{"name":118,"creationTimestamp":2506,"labels":2596},{"haloweb.section":91},{"displayName":2509,"slug":118,"cover":94,"description":2510,"priority":2511,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2513,"postCount":73,"visiblePostCount":73},{"metadata":2600,"spec":2603,"status":2610,"categories":2614},{"name":2601,"creationTimestamp":2602},"post-sharding-shardingsphere-9d880c74","2026-09-13T10:01:13.510910Z",{"title":2604,"slug":2605,"cover":94,"excerpt":2606,"publishTime":2607,"categories":2608,"tags":2609,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"ShardingSphere 的核心功能？","sharding-shardingsphere",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:13.565762Z",[118],[],{"permalink":2611,"excerpt":2612,"lastModifyTime":2613,"phase":154},"\u002Farchives\u002Fsharding-shardingsphere","一、定位 ShardingSphere 是分布式数据库中间件，提供分库分表、读写分离、数据加密等能力。 二、三种模式 ShardingSphere-JDBC：嵌入应用，JAR 包方式，性能好但只支持 Java。 ShardingSphere-Proxy：独立部署代理，支持多语言，有网络开销。 Sha","2026-09-16T09:16:37.209427Z",[2615],{"metadata":2616,"spec":2618,"status":2619,"postCount":73},{"name":118,"creationTimestamp":2506,"labels":2617},{"haloweb.section":91},{"displayName":2509,"slug":118,"cover":94,"description":2510,"priority":2511,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2513,"postCount":73,"visiblePostCount":73},{"category":2621,"posts":2631},{"metadata":2622,"spec":2625,"status":2629,"postCount":73},{"name":119,"creationTimestamp":2623,"labels":2624},"2026-09-13T09:13:26.047027Z",{"haloweb.section":91},{"displayName":2626,"slug":119,"cover":94,"description":2627,"priority":2628,"hideFromList":96,"preventParentPostCascadeQuery":96},"高并发面试题","高并发场景面试题：线程模型、锁优化、无锁化设计、缓存异步化与吞吐量提升实战。",21,{"permalink":2630,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Fhigh-concurrency",[2632,2653,2674,2695,2716],{"metadata":2633,"spec":2636,"status":2643,"categories":2647},{"name":2634,"creationTimestamp":2635},"post-hc-optimize-58adf088","2026-09-13T10:01:13.708765Z",{"title":2637,"slug":2638,"cover":94,"excerpt":2639,"publishTime":2640,"categories":2641,"tags":2642,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"高并发系统的优化手段有哪些？","hc-optimize",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:13.755494Z",[119],[],{"permalink":2644,"excerpt":2645,"lastModifyTime":2646,"phase":154},"\u002Farchives\u002Fhc-optimize","一、前端优化 CDN 加速静态资源。 浏览器缓存、资源合并压缩。 页面懒加载、预加载。 二、网关层 Nginx 负载均衡，动静分离。 限流（令牌桶、漏桶）。 缓存静态页面。 三、应用层 多级缓存：本地缓存（Caffeine）+ 分布式缓存（Redis）。 异步化：消息队列削峰填谷。 线程池调优，合理","2026-09-16T09:16:37.698197Z",[2648],{"metadata":2649,"spec":2651,"status":2652,"postCount":73},{"name":119,"creationTimestamp":2623,"labels":2650},{"haloweb.section":91},{"displayName":2626,"slug":119,"cover":94,"description":2627,"priority":2628,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2630,"postCount":73,"visiblePostCount":73},{"metadata":2654,"spec":2657,"status":2664,"categories":2668},{"name":2655,"creationTimestamp":2656},"post-hc-cache-strategy-fbfb1ec0","2026-09-13T10:01:13.884052Z",{"title":2658,"slug":2659,"cover":94,"excerpt":2660,"publishTime":2661,"categories":2662,"tags":2663,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"高并发下的缓存策略？","hc-cache-strategy",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:13.929859Z",[119],[],{"permalink":2665,"excerpt":2666,"lastModifyTime":2667,"phase":154},"\u002Farchives\u002Fhc-cache-strategy","一、缓存层级 L1：浏览器缓存。 L2：CDN 缓存。 L3：Nginx\u002F网关缓存。 L4：应用本地缓存（Caffeine、Guava）。 L5：分布式缓存（Redis）。 L6：数据库。 二、缓存更新策略 Cache Aside：应用先查缓存，没有查数据库，写入缓存。删除缓存（不是更新）。最常用。","2026-09-16T09:16:38.657076Z",[2669],{"metadata":2670,"spec":2672,"status":2673,"postCount":73},{"name":119,"creationTimestamp":2623,"labels":2671},{"haloweb.section":91},{"displayName":2626,"slug":119,"cover":94,"description":2627,"priority":2628,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2630,"postCount":73,"visiblePostCount":73},{"metadata":2675,"spec":2678,"status":2685,"categories":2689},{"name":2676,"creationTimestamp":2677},"post-hc-current-limit-1b6bf9d1","2026-09-13T10:01:14.087902Z",{"title":2679,"slug":2680,"cover":94,"excerpt":2681,"publishTime":2682,"categories":2683,"tags":2684,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"常见的限流算法？","hc-current-limit",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:14.146105Z",[119],[],{"permalink":2686,"excerpt":2687,"lastModifyTime":2688,"phase":154},"\u002Farchives\u002Fhc-current-limit","一、固定窗口 把时间分成固定窗口，窗口内计数，超过阈值限流。 - 优点：简单。 - 缺点：窗口边界可能突刺（如窗口末尾和下一个窗口开头各来一半，合起来超限）。 二、滑动窗口 把窗口分成多个小格子，随时间滑动，统计格子总数。 - 解决固定窗口的边界问题。 - 实现稍复杂。 三、漏桶算法 请求进桶，桶以","2026-09-16T09:16:40.266278Z",[2690],{"metadata":2691,"spec":2693,"status":2694,"postCount":73},{"name":119,"creationTimestamp":2623,"labels":2692},{"haloweb.section":91},{"displayName":2626,"slug":119,"cover":94,"description":2627,"priority":2628,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2630,"postCount":73,"visiblePostCount":73},{"metadata":2696,"spec":2699,"status":2706,"categories":2710},{"name":2697,"creationTimestamp":2698},"post-hc-degrade-2891db76","2026-09-13T10:01:14.271595Z",{"title":2700,"slug":2701,"cover":94,"excerpt":2702,"publishTime":2703,"categories":2704,"tags":2705,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"服务降级和熔断的区别？","hc-degrade",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:14.323663Z",[119],[],{"permalink":2707,"excerpt":2708,"lastModifyTime":2709,"phase":154},"\u002Farchives\u002Fhc-degrade","一、降级（Degrade） 主动关闭非核心功能，保证核心功能可用。 如大促时关闭评论、推荐，保交易。 是一种策略，通常按预设规则触发。 二、熔断（Circuit Breaker） 下游服务故障时，上游不再调用，直接返回降级结果。 类似电路保险丝，防止故障蔓延。 基于错误率、响应时间等指标自动触发。 ","2026-09-16T09:16:39.827390Z",[2711],{"metadata":2712,"spec":2714,"status":2715,"postCount":73},{"name":119,"creationTimestamp":2623,"labels":2713},{"haloweb.section":91},{"displayName":2626,"slug":119,"cover":94,"description":2627,"priority":2628,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2630,"postCount":73,"visiblePostCount":73},{"metadata":2717,"spec":2720,"status":2727,"categories":2731},{"name":2718,"creationTimestamp":2719},"post-hc-seckill-a6b50dfa","2026-09-13T10:01:14.438458Z",{"title":2721,"slug":2722,"cover":94,"excerpt":2723,"publishTime":2724,"categories":2725,"tags":2726,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"秒杀系统如何设计？","hc-seckill",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:14.624258Z",[119],[],{"permalink":2728,"excerpt":2729,"lastModifyTime":2730,"phase":154},"\u002Farchives\u002Fhc-seckill","一、挑战 高并发、库存有限、防超卖、防刷。 二、优化手段 1. 前端 按钮置灰，防止重复提交。 答题\u002F验证码防机器人。 2. 网关层 限流（用户维度、IP 维度）。 静态资源 CDN。 3. 应用层 Redis 预减库存，判断是否还有库存。 异步下单：请求写 MQ，消费者处理订单。 本地缓存挡热点商","2026-09-16T09:16:40.701998Z",[2732],{"metadata":2733,"spec":2735,"status":2736,"postCount":73},{"name":119,"creationTimestamp":2623,"labels":2734},{"haloweb.section":91},{"displayName":2626,"slug":119,"cover":94,"description":2627,"priority":2628,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2630,"postCount":73,"visiblePostCount":73},{"category":2738,"posts":2748},{"metadata":2739,"spec":2742,"status":2746,"postCount":73},{"name":120,"creationTimestamp":2740,"labels":2741},"2026-09-13T09:13:26.071581Z",{"haloweb.section":91},{"displayName":2743,"slug":120,"cover":94,"description":2744,"priority":2745,"hideFromList":96,"preventParentPostCascadeQuery":96},"高可用面试题","高可用架构面试题：限流熔断降级、故障转移、多活容灾与常见线上故障的兜底思路。",22,{"permalink":2747,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Fhigh-availability",[2749,2770,2791,2812,2833],{"metadata":2750,"spec":2753,"status":2760,"categories":2764},{"name":2751,"creationTimestamp":2752},"post-ha-redis-cluster-03010c3e","2026-09-13T10:01:14.777577Z",{"title":2754,"slug":2755,"cover":94,"excerpt":2756,"publishTime":2757,"categories":2758,"tags":2759,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Redis 高可用方案有哪些？","ha-redis-cluster",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:14.826661Z",[120],[],{"permalink":2761,"excerpt":2762,"lastModifyTime":2763,"phase":154},"\u002Farchives\u002Fha-redis-cluster","一、主从复制 Master 写，Slave 异步复制数据。 读可从 Slave，分担读压力。 Master 挂了需手动切换，不能自动故障转移。 二、哨兵模式（Sentinel） Sentinel 监控 Master\u002FSlave 健康。 Master 故障时自动选举新 Master，通知客户端。 适合","2026-09-16T09:16:41.175475Z",[2765],{"metadata":2766,"spec":2768,"status":2769,"postCount":73},{"name":120,"creationTimestamp":2740,"labels":2767},{"haloweb.section":91},{"displayName":2743,"slug":120,"cover":94,"description":2744,"priority":2745,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2747,"postCount":73,"visiblePostCount":73},{"metadata":2771,"spec":2774,"status":2781,"categories":2785},{"name":2772,"creationTimestamp":2773},"post-ha-db-ha-00eec1c4","2026-09-13T10:01:14.948600Z",{"title":2775,"slug":2776,"cover":94,"excerpt":2777,"publishTime":2778,"categories":2779,"tags":2780,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"MySQL 高可用方案？","ha-db-ha",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:14.996576Z",[120],[],{"permalink":2782,"excerpt":2783,"lastModifyTime":2784,"phase":154},"\u002Farchives\u002Fha-db-ha","一、主从复制 Master 写，Slave 读，异步复制。 Master 挂了需手动切换。 可能数据丢失（异步复制延迟）。 二、MHA（Master High Availability） 自动监控 Master，故障时自动切换。 需额外管理节点。 三、MGR（MySQL Group Replicat","2026-09-16T09:16:39.233963Z",[2786],{"metadata":2787,"spec":2789,"status":2790,"postCount":73},{"name":120,"creationTimestamp":2740,"labels":2788},{"haloweb.section":91},{"displayName":2743,"slug":120,"cover":94,"description":2744,"priority":2745,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2747,"postCount":73,"visiblePostCount":73},{"metadata":2792,"spec":2795,"status":2802,"categories":2806},{"name":2793,"creationTimestamp":2794},"post-ha-service-ha-31d66a73","2026-09-13T10:01:15.148197Z",{"title":2796,"slug":2797,"cover":94,"excerpt":2798,"publishTime":2799,"categories":2800,"tags":2801,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"微服务高可用设计？","ha-service-ha",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:15.196022Z",[120],[],{"permalink":2803,"excerpt":2804,"lastModifyTime":2805,"phase":154},"\u002Farchives\u002Fha-service-ha","一、无状态服务 服务不保存状态，状态存 Redis\u002FDB。 多实例部署，负载均衡。 任一实例挂了不影响。 二、服务发现 注册中心（Nacos\u002FEureka）。 服务实例上下线自动感知。 客户端负载均衡跳过不健康节点。 三、健康检查 注册中心心跳检测，不健康实例剔除。 K8s liveness\u002Frea","2026-09-16T09:16:41.613665Z",[2807],{"metadata":2808,"spec":2810,"status":2811,"postCount":73},{"name":120,"creationTimestamp":2740,"labels":2809},{"haloweb.section":91},{"displayName":2743,"slug":120,"cover":94,"description":2744,"priority":2745,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2747,"postCount":73,"visiblePostCount":73},{"metadata":2813,"spec":2816,"status":2823,"categories":2827},{"name":2814,"creationTimestamp":2815},"post-ha-cap-ac08d517","2026-09-13T10:01:15.333378Z",{"title":2817,"slug":2818,"cover":94,"excerpt":2819,"publishTime":2820,"categories":2821,"tags":2822,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"CAP 定理和 BASE 理论？","ha-cap",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:15.381175Z",[120],[],{"permalink":2824,"excerpt":2825,"lastModifyTime":2826,"phase":154},"\u002Farchives\u002Fha-cap","一、CAP 定理 分布式系统不可能同时满足三个特性，最多满足两个： Consistency（一致性）：所有节点同一时刻看到相同数据。 Availability（可用性）：每个请求都能收到响应（不一定是最新数据）。 Partition tolerance（分区容错性）：网络分区时系统仍能运行。 二、C","2026-09-16T09:16:42.062834Z",[2828],{"metadata":2829,"spec":2831,"status":2832,"postCount":73},{"name":120,"creationTimestamp":2740,"labels":2830},{"haloweb.section":91},{"displayName":2743,"slug":120,"cover":94,"description":2744,"priority":2745,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2747,"postCount":73,"visiblePostCount":73},{"metadata":2834,"spec":2837,"status":2844,"categories":2848},{"name":2835,"creationTimestamp":2836},"post-ha-fault-tolerant-63c13c75","2026-09-13T10:01:15.532338Z",{"title":2838,"slug":2839,"cover":94,"excerpt":2840,"publishTime":2841,"categories":2842,"tags":2843,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"如何设计故障容错的系统？","ha-fault-tolerant",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:15.576722Z",[120],[],{"permalink":2845,"excerpt":2846,"lastModifyTime":2847,"phase":154},"\u002Farchives\u002Fha-fault-tolerant","一、冗余 多实例部署，避免单点。 数据多副本（主从、集群）。 多机房部署。 二、故障检测 心跳检测，快速发现故障。 全链路监控，告警。 三、故障转移 自动切换（哨兵、集群选主）。 手动切流（流量调度）。 四、降级 非核心功能降级，保核心。 返回兜底数据。 五、熔断 下游故障快速失败，防止雪崩。 六、","2026-09-16T09:16:43.163705Z",[2849],{"metadata":2850,"spec":2852,"status":2853,"postCount":73},{"name":120,"creationTimestamp":2740,"labels":2851},{"haloweb.section":91},{"displayName":2743,"slug":120,"cover":94,"description":2744,"priority":2745,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2747,"postCount":73,"visiblePostCount":73},{"category":2855,"posts":2865},{"metadata":2856,"spec":2859,"status":2863,"postCount":73},{"name":121,"creationTimestamp":2857,"labels":2858},"2026-09-13T09:13:26.098074Z",{"haloweb.section":91},{"displayName":2860,"slug":121,"cover":94,"description":2861,"priority":2862,"hideFromList":96,"preventParentPostCascadeQuery":96},"Elasticsearch 面试题","Elasticsearch 面试题精讲：倒排索引、分词检索、聚合分析、集群分片与写入查询调优。",23,{"permalink":2864,"postCount":73,"visiblePostCount":73},"\u002Fcategories\u002Felasticsearch",[2866,2887,2908,2929,2950],{"metadata":2867,"spec":2870,"status":2877,"categories":2881},{"name":2868,"creationTimestamp":2869},"post-es-architecture-a6b20c5d","2026-09-13T10:01:15.732254Z",{"title":2871,"slug":2872,"cover":94,"excerpt":2873,"publishTime":2874,"categories":2875,"tags":2876,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Elasticsearch 的核心概念？","es-architecture",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:15.777887Z",[121],[],{"permalink":2878,"excerpt":2879,"lastModifyTime":2880,"phase":154},"\u002Farchives\u002Fes-architecture","一、核心概念 Index（索引）：类似数据库的表，存储文档。 Document（文档）：JSON 格式的数据，类似行。 Field（字段）：文档中的键值对，类似列。 Shard（分片）：索引分成多个分片，分布在不同节点。 Replica（副本）：分片的副本，高可用。 二、集群 多个 Node 组成 ","2026-09-16T09:16:43.604221Z",[2882],{"metadata":2883,"spec":2885,"status":2886,"postCount":73},{"name":121,"creationTimestamp":2857,"labels":2884},{"haloweb.section":91},{"displayName":2860,"slug":121,"cover":94,"description":2861,"priority":2862,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2864,"postCount":73,"visiblePostCount":73},{"metadata":2888,"spec":2891,"status":2898,"categories":2902},{"name":2889,"creationTimestamp":2890},"post-es-inverted-index-8b7f67f9","2026-09-13T10:01:15.901010Z",{"title":2892,"slug":2893,"cover":94,"excerpt":2894,"publishTime":2895,"categories":2896,"tags":2897,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Elasticsearch 的倒排索引原理？","es-inverted-index",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:15.954299Z",[121],[],{"permalink":2899,"excerpt":2900,"lastModifyTime":2901,"phase":154},"\u002Farchives\u002Fes-inverted-index","一、定义 正排索引：文档 → 词列表。 倒排索引：词 → 文档列表。 二、构建过程 文档内容分词，得到词（term）。 建立 term → [doc1, doc2, ...] 的映射。 记录词频、位置等信息。 三、示例 文档1：Java 面试\n文档2：Java 集合\n文档3：Redis 缓存\n\n倒排","2026-09-16T09:16:44.086521Z",[2903],{"metadata":2904,"spec":2906,"status":2907,"postCount":73},{"name":121,"creationTimestamp":2857,"labels":2905},{"haloweb.section":91},{"displayName":2860,"slug":121,"cover":94,"description":2861,"priority":2862,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2864,"postCount":73,"visiblePostCount":73},{"metadata":2909,"spec":2912,"status":2919,"categories":2923},{"name":2910,"creationTimestamp":2911},"post-es-query-2bd1cec3","2026-09-13T10:01:16.111595Z",{"title":2913,"slug":2914,"cover":94,"excerpt":2915,"publishTime":2916,"categories":2917,"tags":2918,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Elasticsearch 常用查询类型？","es-query",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:16.311844Z",[121],[],{"permalink":2920,"excerpt":2921,"lastModifyTime":2922,"phase":154},"\u002Farchives\u002Fes-query","一、全文查询 match：对查询词分词后匹配。 match_phrase：短语匹配，词序固定。 multi_match：多字段匹配。 query_string：支持 Lucene 查询语法。 二、精确查询 term：精确匹配不分词的值。 terms：多值精确匹配。 range：范围查询。 exist","2026-09-16T09:16:44.539296Z",[2924],{"metadata":2925,"spec":2927,"status":2928,"postCount":73},{"name":121,"creationTimestamp":2857,"labels":2926},{"haloweb.section":91},{"displayName":2860,"slug":121,"cover":94,"description":2861,"priority":2862,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2864,"postCount":73,"visiblePostCount":73},{"metadata":2930,"spec":2933,"status":2940,"categories":2944},{"name":2931,"creationTimestamp":2932},"post-es-cluster-9db8e817","2026-09-13T10:01:16.451613Z",{"title":2934,"slug":2935,"cover":94,"excerpt":2936,"publishTime":2937,"categories":2938,"tags":2939,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Elasticsearch 集群架构？","es-cluster",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:16.505423Z",[121],[],{"permalink":2941,"excerpt":2942,"lastModifyTime":2943,"phase":154},"\u002Farchives\u002Fes-cluster","一、节点角色 Master：管理集群元数据，选举。 Data：存储分片数据，执行 CRUD、搜索。 Ingest：数据预处理（pipeline）。 Coordinating：路由请求，合并结果。 Machine Learning：机器学习。 Remote Cluster：跨集群搜索。 二、分片 In","2026-09-16T09:16:45.007110Z",[2945],{"metadata":2946,"spec":2948,"status":2949,"postCount":73},{"name":121,"creationTimestamp":2857,"labels":2947},{"haloweb.section":91},{"displayName":2860,"slug":121,"cover":94,"description":2861,"priority":2862,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2864,"postCount":73,"visiblePostCount":73},{"metadata":2951,"spec":2954,"status":2961,"categories":2965},{"name":2952,"creationTimestamp":2953},"post-es-optimize-53774e14","2026-09-13T10:01:16.647823Z",{"title":2955,"slug":2956,"cover":94,"excerpt":2957,"publishTime":2958,"categories":2959,"tags":2960,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},"Elasticsearch 性能优化？","es-optimize",{"raw":94,"autoGenerate":145},"2026-09-13T10:01:16.693387Z",[121],[],{"permalink":2962,"excerpt":2963,"lastModifyTime":2964,"phase":154},"\u002Farchives\u002Fes-optimize","一、写入优化 批量写入（Bulk API），减少网络开销。 增加 refresh_interval（如 30s），减少 refresh 频率。 关闭副本，写完再开。 用 SSD 存储。 TransLog 异步刷盘。 二、查询优化 用 filter 替代 query 做过滤。 避免深度分页，用 sea","2026-09-16T09:16:45.471802Z",[2966],{"metadata":2967,"spec":2969,"status":2970,"postCount":73},{"name":121,"creationTimestamp":2857,"labels":2968},{"haloweb.section":91},{"displayName":2860,"slug":121,"cover":94,"description":2861,"priority":2862,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":2864,"postCount":73,"visiblePostCount":73},[137,161,182,203,224,245,266,287,319,340,361,382,403,435,456,477,498,519,551,572,593,614,635,1696,1717,1738,1759,1780,995,1016,1037,1058,1079,667,688,709,730,751,783,804,825,846,1228,1249,1270,1291,1312,878,899,920,941,962,1111,1132,1153,1174,1195,1813,1834,1855,1876,1897,1930,1951,1972,1993,2014,1462,1483,1504,1525,1546,1579,1600,1621,1642,1663,1345,1366,1387,1408,1429,2047,2068,2089,2110,2131,2398,2419,2440,2461,2482,2515,2536,2557,2578,2599,2632,2653,2674,2695,2716,2749,2770,2791,2812,2833,2866,2887,2908,2929,2950,2164,2185,2206,2227,2248,2281,2302,2323,2344,2365],{"metadata":2973,"spec":2974,"status":2978,"categories":2979,"content":2985},{"name":226,"creationTimestamp":227},{"title":229,"slug":230,"cover":94,"excerpt":2975,"publishTime":232,"categories":2976,"tags":2977,"priority":27,"pinned":96,"deleted":96,"visible":149,"allowComment":145},{"raw":94,"autoGenerate":145},[98],[],{"permalink":236,"excerpt":237,"lastModifyTime":238,"phase":154},[2980],{"metadata":2981,"spec":2983,"status":2984,"postCount":135},{"name":98,"creationTimestamp":128,"labels":2982},{"haloweb.section":91},{"displayName":131,"slug":98,"cover":94,"description":132,"priority":27,"hideFromList":96,"preventParentPostCascadeQuery":96},{"permalink":134,"postCount":135,"visiblePostCount":135},{"content":2986,"raw":2986},"\u003Ch2>一、不可变的体现\u003C\u002Fh2>\n\u003Cp>String 内部用 \u003Ccode>final char[]\u003C\u002Fcode>（JDK 9 后是 \u003Ccode>byte[]\u003C\u002Fcode>）存储字符，且没有提供修改内部数组的方法，一旦创建内容就不能改。所谓\"修改\"其实是创建新对象。\u003C\u002Fp>\n\u003Ch2>二、设计原因\u003C\u002Fh2>\n\u003Col>\n\u003Cli>\u003Cstrong>字符串常量池复用\u003C\u002Fstrong>：相同字面量共享同一对象，节省内存。\u003C\u002Fli>\n\u003Cli>\u003Cstrong>线程安全\u003C\u002Fstrong>：不可变对象天然线程安全，多线程下无需同步。\u003C\u002Fli>\n\u003Cli>\u003Cstrong>hashCode 缓存\u003C\u002Fstrong>：String 的 hashCode 在首次计算后缓存，作为 HashMap 键时性能稳定。\u003C\u002Fli>\n\u003Cli>\u003Cstrong>安全性\u003C\u002Fstrong>：作为参数传递时不会被意外篡改，如数据库连接串、文件名。\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Ch2>三、注意事项\u003C\u002Fh2>\n\u003Cpre>\u003Ccode class=\"language-java\">String s = &quot;hello&quot;;\ns += &quot; world&quot;;   \u002F\u002F 不是修改原对象，而是新建 &quot;hello world&quot;\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>频繁拼接字符串会产生大量临时对象，应使用 StringBuilder。\u003C\u002Fp>"]