[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"site-config":3,"primary-menu":20,"tags-cloud":109,"tagposts-interview-5":293},{"config":4,"socialLinks":19},{"title":5,"subtitle":6,"logoUrl":7,"faviconUrl":8,"footerText":9,"beianIcp":10,"beianPublicSecurity":9,"seoDescription":11,"seoKeywords":12,"homepageTitle":13,"homepageSubtitle":14,"analyticsHeadCode":15,"planetQrcodeUrl":16,"planetIntroHtml":9,"planetCtaText":17,"updatedAt":18},"编码世界","用编码改变世界","https:\u002F\u002Fcdn.mashangan.com\u002Fupload\u002F2026\u002F09\u002F2f277021172f43f6bb34e1c115760b7f.png","https:\u002F\u002Fcdn.mashangan.com\u002Fupload\u002F2026\u002F09\u002Fdcbad022e68c4a729a5dc4997a9bba8a.png","","苏ICP备2026073884号","编码世界（mashangan.com）是面向 Java 后端与 Go 语言的系统化编程教程站：提供\nMyBatis Plus、Lombok、Java 8、IDEA、Docker 等原创图文教程，以及 JVM、并发、\nSpring、MySQL、Redis、消息队列、计算机网络等大厂面试八股题库，另有可落地的\n项目实战系列，帮你从入门到精通。","编码世界,Java教程,Go语言教程,Docker教程,MyBatis Plus教程,Lombok教程, Java 8新特性,IDEA教程,Java面试题,八股文,JVM面试题,Java并发面试题, MySQL面试题,Redis面试题,Spring面试题,消息队列面试题,高并发,分库分表, Netty面试题,计算机网络面试题,AI Agent,RAG,程序员学习路线","Java全栈系统化编程教程","覆盖 MyBatis Plus、Lombok、Java 8、IDEA、Go、Docker 等原创图文教程，配套大厂面试八股题库，从入门到精通，持续更新","\u003Cscript>\nvar _hmt = _hmt || [];\n(function() {\n  var hm = document.createElement(\"script\");\n  hm.src = \"https:\u002F\u002Fhm.baidu.com\u002Fhm.js?f00af7e56d956c02e11efed4131379b0\";\n  var s = document.getElementsByTagName(\"script\")[0]; \n  s.parentNode.insertBefore(hm, s);\n})();\n\u003C\u002Fscript>\n","https:\u002F\u002Fcdn.mashangan.com\u002Fupload\u002F2026\u002F09\u002Fc1a8f5de46584d3eb0bc762c180a5db9.png","扫码加入知识星球","2026-10-05T13:09:51.904487Z",[],{"metadata":21,"spec":24,"menuItems":35},{"name":22,"creationTimestamp":23},"primary","2026-09-12T06:13:55.024154Z",{"displayName":25,"menuItems":26},"主菜单",[27,28,29,30,31,32,33,34],"88c3f10b-321c-4092-86a8-70db00251b74","menu-item-izrtmxer","c4c814d1-0c2c-456b-8c96-4864965fee94","menu-item-tags","menu-item-column","menu-item-tools","menu-item-zsxq","menu-item-ocrxlczu",[36,45,55,64,73,82,91,100],{"displayName":37,"metadata":38,"spec":40,"status":43,"children":44},"首页",{"name":27,"creationTimestamp":39},"2026-09-12T06:13:54.422830Z",{"displayName":37,"href":41,"priority":42,"menuName":22},"\u002F",0,{"displayName":37,"href":41},[],{"displayName":46,"metadata":47,"spec":49,"status":53,"children":54},"Java面试八股",{"name":28,"creationTimestamp":48},"2026-09-13T09:42:02.854891Z",{"displayName":46,"href":50,"target":51,"priority":52,"menuName":22},"\u002Fjava-interview","_self",1,{"displayName":46,"href":50},[],{"displayName":56,"metadata":57,"spec":59,"status":62,"children":63},"文章",{"name":29,"creationTimestamp":58},"2026-09-12T06:13:54.457307Z",{"displayName":56,"href":60,"priority":61,"menuName":22},"\u002Farchives",2,{"displayName":56,"href":60},[],{"displayName":65,"metadata":66,"spec":68,"status":71,"children":72},"标签",{"name":30,"creationTimestamp":67},"2026-10-07T00:42:42.754151Z",{"displayName":65,"href":69,"priority":70,"menuName":22},"\u002Ftags",3,{"displayName":65,"href":69},[],{"displayName":74,"metadata":75,"spec":77,"status":80,"children":81},"项目实战",{"name":31,"creationTimestamp":76},"2026-09-14T00:35:08.138170Z",{"displayName":74,"href":78,"target":51,"priority":79,"menuName":22},"\u002Fcolumn",4,{"displayName":74,"href":78},[],{"displayName":83,"metadata":84,"spec":86,"status":89,"children":90},"在线工具",{"name":32,"creationTimestamp":85},"2026-09-14T00:35:08.171474Z",{"displayName":83,"href":87,"target":51,"priority":88,"menuName":22},"\u002Ftools",5,{"displayName":83,"href":87},[],{"displayName":92,"metadata":93,"spec":95,"status":98,"children":99},"知识星球",{"name":33,"creationTimestamp":94},"2026-09-14T00:35:08.199145Z",{"displayName":92,"href":96,"target":51,"priority":97,"menuName":22},"\u002Fzsxq",6,{"displayName":92,"href":96},[],{"displayName":101,"metadata":102,"spec":104,"status":107,"children":108},"特价云服务",{"name":34,"creationTimestamp":103},"2026-09-25T15:30:59.201614Z",{"displayName":101,"href":105,"target":51,"priority":106,"menuName":22},"\u002Fserver",7,{"displayName":101,"href":105},[],[110,117,124,131,138,145,152,159,166,172,178,184,191,197,203,209,215,221,227,233,239,245,251,257,263,269,275,281,287],{"metadata":111,"spec":113,"postCount":116},{"name":112},"tag-04980744",{"displayName":114,"slug":115},"面试题","interview",118,{"metadata":118,"spec":120,"postCount":123},{"name":119},"tag-93f725a0",{"displayName":121,"slug":122},"Java","java",68,{"metadata":125,"spec":127,"postCount":130},{"name":126},"tag-05b6053c",{"displayName":128,"slug":129},"Docker","docker",43,{"metadata":132,"spec":134,"postCount":137},{"name":133},"tag-1cba77c3",{"displayName":135,"slug":136},"IDEA","idea",32,{"metadata":139,"spec":141,"postCount":144},{"name":140},"tag-116a0109",{"displayName":142,"slug":143},"数字孪生","digital-twin",19,{"metadata":146,"spec":148,"postCount":151},{"name":147},"tag-a2fb95ac",{"displayName":149,"slug":150},"MyBatis Plus","mybatis-plus",18,{"metadata":153,"spec":155,"postCount":158},{"name":154},"tag-cc6220f9",{"displayName":156,"slug":157},"Lombok","lombok",15,{"metadata":160,"spec":162,"postCount":165},{"name":161},"tag-2a2d595e",{"displayName":163,"slug":164},"Spring","spring",10,{"metadata":167,"spec":169,"postCount":165},{"name":168},"tag-1d8a4975",{"displayName":170,"slug":171},"消息队列","mq",{"metadata":173,"spec":175,"postCount":165},{"name":174},"tag-17245299",{"displayName":176,"slug":177},"并发","concurrency",{"metadata":179,"spec":181,"postCount":165},{"name":180},"tag-4921c0e2",{"displayName":182,"slug":183},"AI","ai",{"metadata":185,"spec":187,"postCount":190},{"name":186},"tag-53bb7900",{"displayName":188,"slug":189},"卫星仿真","satellite",9,{"metadata":192,"spec":194,"postCount":88},{"name":193},"tag-62377bcf",{"displayName":195,"slug":196},"Spring Cloud","spring-cloud",{"metadata":198,"spec":200,"postCount":88},{"name":199},"tag-81c3b080",{"displayName":201,"slug":202},"MySQL","mysql",{"metadata":204,"spec":206,"postCount":88},{"name":205},"tag-86a1b907",{"displayName":207,"slug":208},"Redis","redis",{"metadata":210,"spec":212,"postCount":88},{"name":211},"tag-18897dcf",{"displayName":213,"slug":214},"Elasticsearch","elasticsearch",{"metadata":216,"spec":218,"postCount":88},{"name":217},"tag-6ce80d8e",{"displayName":219,"slug":220},"JVM","jvm",{"metadata":222,"spec":224,"postCount":88},{"name":223},"tag-aa4e1b8c",{"displayName":225,"slug":226},"Dubbo","dubbo",{"metadata":228,"spec":230,"postCount":88},{"name":229},"tag-9e30c249",{"displayName":231,"slug":232},"Netty","netty",{"metadata":234,"spec":236,"postCount":88},{"name":235},"tag-2199ace5",{"displayName":237,"slug":238},"ZooKeeper","zookeeper",{"metadata":240,"spec":242,"postCount":88},{"name":241},"tag-7c298a76",{"displayName":243,"slug":244},"设计模式","design-pattern",{"metadata":246,"spec":248,"postCount":88},{"name":247},"tag-6cf6cea9",{"displayName":249,"slug":250},"高可用","high-availability",{"metadata":252,"spec":254,"postCount":88},{"name":253},"tag-918786ab",{"displayName":255,"slug":256},"分库分表","sharding",{"metadata":258,"spec":260,"postCount":88},{"name":259},"tag-91e02cd2",{"displayName":261,"slug":262},"计算机网络","network",{"metadata":264,"spec":266,"postCount":88},{"name":265},"tag-dd302f94",{"displayName":267,"slug":268},"操作系统","os",{"metadata":270,"spec":272,"postCount":88},{"name":271},"tag-1b359d87",{"displayName":273,"slug":274},"Tomcat","tomcat",{"metadata":276,"spec":278,"postCount":79},{"name":277},"tag-f0d71b77",{"displayName":279,"slug":280},"MyBatis","mybatis",{"metadata":282,"spec":284,"postCount":52},{"name":283},"tag-a118a308",{"displayName":285,"slug":286},"时序数据库","tsdb",{"metadata":288,"spec":290,"postCount":42},{"name":289},"tag-34d1f91f",{"displayName":291,"slug":292},"Go","go",{"page":88,"size":294,"total":116,"items":295,"first":309,"last":309,"hasNext":304,"hasPrevious":304,"totalPages":97},20,[296,336,365,394,423,452,489,521,553,585,617,654,686,718,750,782,816,845,874,903],{"metadata":297,"spec":300,"status":311,"categories":316,"tags":329},{"name":298,"creationTimestamp":299},"post-rocketmq-consume-mode-70b00679","2026-09-13T10:01:00.899415Z",{"title":301,"slug":302,"cover":9,"excerpt":303,"publishTime":305,"categories":306,"tags":308,"priority":42,"pinned":309,"deleted":309,"visible":310,"allowComment":304},"RocketMQ 的集群消费和广播消费？","rocketmq-consume-mode",{"raw":9,"autoGenerate":304},true,"2026-09-13T10:01:00.945332Z",[307],"rocketmq",[112,168],false,"PUBLIC",{"permalink":312,"excerpt":313,"lastModifyTime":314,"phase":315},"\u002Farchives\u002Frocketmq-consume-mode","一、集群消费（CLUSTERING） 同一条消息只被消费组内的一个消费者消费。 负载均衡：队列在消费者之间分配。 实际生产中最常用。 二、广播消费（BROADCASTING） 同一条消息被消费组内所有消费者都消费一次。 每个消费者都消费全量消息。 适用于需要所有节点都处理的场景，如配置刷新、缓存失效","2026-09-16T09:14:33.803421Z","PUBLISHED",[317],{"metadata":318,"spec":323,"status":327,"postCount":88},{"name":307,"creationTimestamp":319,"labels":320,"annotations":321},"2026-09-13T09:13:25.595131Z",{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":322},"updating",{"displayName":324,"slug":307,"cover":9,"description":325,"priority":326,"hideFromList":309,"preventParentPostCascadeQuery":309},"RocketMQ 面试题","RocketMQ 面试题：消息存储与刷盘、顺序消息、事务消息、重试积压与高可用。",13,{"permalink":328,"postCount":88,"visiblePostCount":88},"\u002Fcategories\u002Frocketmq",[330,333],{"metadata":331,"spec":332},{"name":112},{"displayName":114,"slug":115},{"metadata":334,"spec":335},{"name":168},{"displayName":170,"slug":171},{"metadata":337,"spec":340,"status":347,"categories":351,"tags":358},{"name":338,"creationTimestamp":339},"post-rocketmq-vs-kafka-754ab039","2026-09-13T10:01:00.693827Z",{"title":341,"slug":342,"cover":9,"excerpt":343,"publishTime":344,"categories":345,"tags":346,"priority":42,"pinned":309,"deleted":309,"visible":310,"allowComment":304},"RocketMQ 和 Kafka 的区别？","rocketmq-vs-kafka",{"raw":9,"autoGenerate":304},"2026-09-13T10:01:00.741026Z",[307],[168,112],{"permalink":348,"excerpt":349,"lastModifyTime":350,"phase":315},"\u002Farchives\u002Frocketmq-vs-kafka","一、对比 维度 RocketMQ Kafka 开发语言 Java Java\u002FScala 消息模型 Topic\u002FQueue Topic\u002FPartition 顺序消息 支持 支持（分区内） 延迟消息 支持 不原生支持 事务消息 支持 不支持 吞吐量 十万级 百万级 适用场景 业务消息、事务 日志、大数据","2026-09-16T09:13:49.958883Z",[352],{"metadata":353,"spec":356,"status":357,"postCount":88},{"name":307,"creationTimestamp":319,"labels":354,"annotations":355},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":322},{"displayName":324,"slug":307,"cover":9,"description":325,"priority":326,"hideFromList":309,"preventParentPostCascadeQuery":309},{"permalink":328,"postCount":88,"visiblePostCount":88},[359,362],{"metadata":360,"spec":361},{"name":168},{"displayName":170,"slug":171},{"metadata":363,"spec":364},{"name":112},{"displayName":114,"slug":115},{"metadata":366,"spec":369,"status":376,"categories":380,"tags":387},{"name":367,"creationTimestamp":368},"post-rocketmq-reliable-24e9291a","2026-09-13T10:01:00.523686Z",{"title":370,"slug":371,"cover":9,"excerpt":372,"publishTime":373,"categories":374,"tags":375,"priority":42,"pinned":309,"deleted":309,"visible":310,"allowComment":304},"RocketMQ 如何保证消息不丢？","rocketmq-reliable",{"raw":9,"autoGenerate":304},"2026-09-13T10:01:00.572891Z",[307],[168,112],{"permalink":377,"excerpt":378,"lastModifyTime":379,"phase":315},"\u002Farchives\u002Frocketmq-reliable","一、生产端不丢 同步发送：等待 Broker ACK，失败重试。 开启重试机制：retryTimesWhenSendFailed。 事务消息保证本地事务与消息发送一致。 二、Broker 不丢 同步刷盘：消息写入磁盘才返回成功（flushDiskType=SYNC_FLUSH）。 同步复制：主从都写","2026-09-16T09:14:33.332245Z",[381],{"metadata":382,"spec":385,"status":386,"postCount":88},{"name":307,"creationTimestamp":319,"labels":383,"annotations":384},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":322},{"displayName":324,"slug":307,"cover":9,"description":325,"priority":326,"hideFromList":309,"preventParentPostCascadeQuery":309},{"permalink":328,"postCount":88,"visiblePostCount":88},[388,391],{"metadata":389,"spec":390},{"name":168},{"displayName":170,"slug":171},{"metadata":392,"spec":393},{"name":112},{"displayName":114,"slug":115},{"metadata":395,"spec":398,"status":405,"categories":409,"tags":416},{"name":396,"creationTimestamp":397},"post-rocketmq-message-type-0be350ba","2026-09-13T10:01:00.102484Z",{"title":399,"slug":400,"cover":9,"excerpt":401,"publishTime":402,"categories":403,"tags":404,"priority":42,"pinned":309,"deleted":309,"visible":310,"allowComment":304},"RocketMQ 支持哪些消息类型？","rocketmq-message-type",{"raw":9,"autoGenerate":304},"2026-09-13T10:01:00.301633Z",[307],[112,168],{"permalink":406,"excerpt":407,"lastModifyTime":408,"phase":315},"\u002Farchives\u002Frocketmq-message-type","一、普通消息 最基本的消息，发完即走。 二、顺序消息 同一队列内消息严格有序。发送时用 MessageQueueSelector 把同一业务 key 的消息发到同一队列，消费时同一队列只一个线程消费。 三、延迟消息 消息发送后延迟一段时间才投递。RocketMQ 支持固定延迟级别（1s\u002F5s\u002F10s","2026-09-16T09:14:32.740019Z",[410],{"metadata":411,"spec":414,"status":415,"postCount":88},{"name":307,"creationTimestamp":319,"labels":412,"annotations":413},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":322},{"displayName":324,"slug":307,"cover":9,"description":325,"priority":326,"hideFromList":309,"preventParentPostCascadeQuery":309},{"permalink":328,"postCount":88,"visiblePostCount":88},[417,420],{"metadata":418,"spec":419},{"name":112},{"displayName":114,"slug":115},{"metadata":421,"spec":422},{"name":168},{"displayName":170,"slug":171},{"metadata":424,"spec":427,"status":434,"categories":438,"tags":445},{"name":425,"creationTimestamp":426},"post-rocketmq-architecture-5f234f2c","2026-09-13T10:00:59.937731Z",{"title":428,"slug":429,"cover":9,"excerpt":430,"publishTime":431,"categories":432,"tags":433,"priority":42,"pinned":309,"deleted":309,"visible":310,"allowComment":304},"RocketMQ 的整体架构？","rocketmq-architecture",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:59.982984Z",[307],[112,168],{"permalink":435,"excerpt":436,"lastModifyTime":437,"phase":315},"\u002Farchives\u002Frocketmq-architecture","一、四大角色 Producer：消息生产者。 Consumer：消息消费者，支持 Push\u002FPull 两种模式。 NameServer：路由注册中心，无状态，可集群部署，节点间不通信。 Broker：消息存储与转发，可主从部署。 二、工作流程 NameServer 启动，Broker 启动后向所有 ","2026-09-16T09:14:32.272233Z",[439],{"metadata":440,"spec":443,"status":444,"postCount":88},{"name":307,"creationTimestamp":319,"labels":441,"annotations":442},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":322},{"displayName":324,"slug":307,"cover":9,"description":325,"priority":326,"hideFromList":309,"preventParentPostCascadeQuery":309},{"permalink":328,"postCount":88,"visiblePostCount":88},[446,449],{"metadata":447,"spec":448},{"name":112},{"displayName":114,"slug":115},{"metadata":450,"spec":451},{"name":168},{"displayName":170,"slug":171},{"metadata":453,"spec":456,"status":464,"categories":468,"tags":479},{"name":454,"creationTimestamp":455},"post-jc-countdownlatch-cyclicbarrier-e9df49ff","2026-09-13T10:00:59.739697Z",{"title":457,"slug":458,"cover":9,"excerpt":459,"publishTime":460,"categories":461,"tags":463,"priority":42,"pinned":309,"deleted":309,"visible":310,"allowComment":304},"CountDownLatch 和 CyclicBarrier 的区别？","jc-countdownlatch-cyclicbarrier",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:59.785610Z",[462],"java-concurrent",[119,112,174],{"permalink":465,"excerpt":466,"lastModifyTime":467,"phase":315},"\u002Farchives\u002Fjc-countdownlatch-cyclicbarrier","一、CountDownLatch 一个或多个线程等待其他线程完成后再继续。 用计数器实现，countDown() 减 1，await() 等待归零。 一次性，归零后不能重置。 场景：主线程等待多个子任务完成。 二、CyclicBarrier 一组线程互相等待，全部到达屏障点后一起继续。 可循环使用，","2026-09-16T09:13:46.649457Z",[469],{"metadata":470,"spec":474,"status":477,"postCount":88},{"name":462,"creationTimestamp":471,"labels":472,"annotations":473},"2026-09-13T09:13:25.680850Z",{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":322},{"displayName":475,"slug":462,"cover":9,"description":476,"priority":158,"hideFromList":309,"preventParentPostCascadeQuery":309},"Java 并发面试题","Java 并发编程面试题：JMM、synchronized 与锁、线程池、AQS 与并发容器。",{"permalink":478,"postCount":88,"visiblePostCount":88},"\u002Fcategories\u002Fjava-concurrent",[480,483,486],{"metadata":481,"spec":482},{"name":119},{"displayName":121,"slug":122},{"metadata":484,"spec":485},{"name":112},{"displayName":114,"slug":115},{"metadata":487,"spec":488},{"name":174},{"displayName":176,"slug":177},{"metadata":490,"spec":493,"status":500,"categories":504,"tags":511},{"name":491,"creationTimestamp":492},"post-jc-volatile-b6390e4d","2026-09-13T10:00:59.557235Z",{"title":494,"slug":495,"cover":9,"excerpt":496,"publishTime":497,"categories":498,"tags":499,"priority":42,"pinned":309,"deleted":309,"visible":310,"allowComment":304},"volatile 关键字的作用？","jc-volatile",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:59.633464Z",[462],[174,112,119],{"permalink":501,"excerpt":502,"lastModifyTime":503,"phase":315},"\u002Farchives\u002Fjc-volatile","一、两大作用 可见性：被 volatile 修饰的变量，一个线程修改后其他线程立即可见。实现：写入时立即刷新主内存，读取时从主内存重新加载。 禁止指令重排：在读写操作前后插入内存屏障。 二、不保证原子性 volatile int count = 0;\ncount++;   \u002F\u002F 不是原子操作，多线程","2026-09-16T09:13:45.577642Z",[505],{"metadata":506,"spec":509,"status":510,"postCount":88},{"name":462,"creationTimestamp":471,"labels":507,"annotations":508},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":322},{"displayName":475,"slug":462,"cover":9,"description":476,"priority":158,"hideFromList":309,"preventParentPostCascadeQuery":309},{"permalink":478,"postCount":88,"visiblePostCount":88},[512,515,518],{"metadata":513,"spec":514},{"name":174},{"displayName":176,"slug":177},{"metadata":516,"spec":517},{"name":112},{"displayName":114,"slug":115},{"metadata":519,"spec":520},{"name":119},{"displayName":121,"slug":122},{"metadata":522,"spec":525,"status":532,"categories":536,"tags":543},{"name":523,"creationTimestamp":524},"post-jc-aqs-principle-2a5a9213","2026-09-13T10:00:59.136776Z",{"title":526,"slug":527,"cover":9,"excerpt":528,"publishTime":529,"categories":530,"tags":531,"priority":42,"pinned":309,"deleted":309,"visible":310,"allowComment":304},"AQS 的原理是什么？","jc-aqs-principle",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:59.366386Z",[462],[112,174,119],{"permalink":533,"excerpt":534,"lastModifyTime":535,"phase":315},"\u002Farchives\u002Fjc-aqs-principle","一、定义 AQS（AbstractQueuedSynchronizer）是 JUC 锁的基础框架，用一个 int 状态变量（state）和一个 FIFO 等待队列实现同步。 二、核心 state：同步状态，0 表示空闲，>0 表示被占用。 CLH 队列：未获取锁的线程封装成 Node 入队，自旋 +","2026-09-16T09:14:31.781664Z",[537],{"metadata":538,"spec":541,"status":542,"postCount":88},{"name":462,"creationTimestamp":471,"labels":539,"annotations":540},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":322},{"displayName":475,"slug":462,"cover":9,"description":476,"priority":158,"hideFromList":309,"preventParentPostCascadeQuery":309},{"permalink":478,"postCount":88,"visiblePostCount":88},[544,547,550],{"metadata":545,"spec":546},{"name":112},{"displayName":114,"slug":115},{"metadata":548,"spec":549},{"name":174},{"displayName":176,"slug":177},{"metadata":551,"spec":552},{"name":119},{"displayName":121,"slug":122},{"metadata":554,"spec":557,"status":564,"categories":568,"tags":575},{"name":555,"creationTimestamp":556},"post-jc-thread-pool-9d19f73f","2026-09-13T10:00:58.904245Z",{"title":558,"slug":559,"cover":9,"excerpt":560,"publishTime":561,"categories":562,"tags":563,"priority":42,"pinned":309,"deleted":309,"visible":310,"allowComment":304},"线程池的核心参数与工作流程？","jc-thread-pool",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:58.966174Z",[462],[119,112,174],{"permalink":565,"excerpt":566,"lastModifyTime":567,"phase":315},"\u002Farchives\u002Fjc-thread-pool","一、七大核心参数 corePoolSize：核心线程数，即使空闲也保留。 maximumPoolSize：最大线程数。 keepAliveTime：非核心线程空闲存活时间。 unit：时间单位。 workQueue：阻塞队列。 threadFactory：线程工厂。 handler：拒绝策略。 二、","2026-09-16T09:13:44.180134Z",[569],{"metadata":570,"spec":573,"status":574,"postCount":88},{"name":462,"creationTimestamp":471,"labels":571,"annotations":572},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":322},{"displayName":475,"slug":462,"cover":9,"description":476,"priority":158,"hideFromList":309,"preventParentPostCascadeQuery":309},{"permalink":478,"postCount":88,"visiblePostCount":88},[576,579,582],{"metadata":577,"spec":578},{"name":119},{"displayName":121,"slug":122},{"metadata":580,"spec":581},{"name":112},{"displayName":114,"slug":115},{"metadata":583,"spec":584},{"name":174},{"displayName":176,"slug":177},{"metadata":586,"spec":589,"status":596,"categories":600,"tags":607},{"name":587,"creationTimestamp":588},"post-jc-synchronized-vs-reentrantlock-135c349a","2026-09-13T10:00:58.693292Z",{"title":590,"slug":591,"cover":9,"excerpt":592,"publishTime":593,"categories":594,"tags":595,"priority":42,"pinned":309,"deleted":309,"visible":310,"allowComment":304},"synchronized 和 ReentrantLock 的区别？","jc-synchronized-vs-reentrantlock",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:58.757444Z",[462],[112,119,174],{"permalink":597,"excerpt":598,"lastModifyTime":599,"phase":315},"\u002Farchives\u002Fjc-synchronized-vs-reentrantlock","一、底层实现 synchronized：JVM 级，字节码指令 monitorenter\u002Fmonitorexit，依赖对象头的 Mark Word。 ReentrantLock：JDK 级，基于 AQS（AbstractQueuedSynchronizer）实现。 二、对比 维度 synchroni","2026-09-16T09:14:31.338006Z",[601],{"metadata":602,"spec":605,"status":606,"postCount":88},{"name":462,"creationTimestamp":471,"labels":603,"annotations":604},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":322},{"displayName":475,"slug":462,"cover":9,"description":476,"priority":158,"hideFromList":309,"preventParentPostCascadeQuery":309},{"permalink":478,"postCount":88,"visiblePostCount":88},[608,611,614],{"metadata":609,"spec":610},{"name":112},{"displayName":114,"slug":115},{"metadata":612,"spec":613},{"name":119},{"displayName":121,"slug":122},{"metadata":615,"spec":616},{"name":174},{"displayName":176,"slug":177},{"metadata":618,"spec":621,"status":628,"categories":632,"tags":644},{"name":619,"creationTimestamp":620},"post-jvm-oom-types-66061da5","2026-09-13T10:00:58.521007Z",{"title":622,"slug":623,"cover":9,"excerpt":624,"publishTime":625,"categories":626,"tags":627,"priority":42,"pinned":309,"deleted":309,"visible":310,"allowComment":304},"常见的 OOM 有哪些？","jvm-oom-types",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:58.572152Z",[220],[112,119,217],{"permalink":629,"excerpt":630,"lastModifyTime":631,"phase":315},"\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",[633],{"metadata":634,"spec":638,"status":642,"postCount":88},{"name":220,"creationTimestamp":635,"labels":636,"annotations":637},"2026-09-13T09:13:25.841121Z",{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":322},{"displayName":639,"slug":220,"cover":9,"description":640,"priority":641,"hideFromList":309,"preventParentPostCascadeQuery":309},"JVM 面试题","JVM 面试题：内存区域、垃圾回收算法与收集器、类加载机制与线上调优参数。",21,{"permalink":643,"postCount":88,"visiblePostCount":88},"\u002Fcategories\u002Fjvm",[645,648,651],{"metadata":646,"spec":647},{"name":112},{"displayName":114,"slug":115},{"metadata":649,"spec":650},{"name":119},{"displayName":121,"slug":122},{"metadata":652,"spec":653},{"name":217},{"displayName":219,"slug":220},{"metadata":655,"spec":658,"status":665,"categories":669,"tags":676},{"name":656,"creationTimestamp":657},"post-jvm-class-loading-e984c960","2026-09-13T10:00:58.362832Z",{"title":659,"slug":660,"cover":9,"excerpt":661,"publishTime":662,"categories":663,"tags":664,"priority":42,"pinned":309,"deleted":309,"visible":310,"allowComment":304},"类加载过程是怎样的？","jvm-class-loading",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:58.408526Z",[220],[217,112,119],{"permalink":666,"excerpt":667,"lastModifyTime":668,"phase":315},"\u002Farchives\u002Fjvm-class-loading","一、五个阶段 加载：通过类的全限定名获取二进制字节流，在内存中生成 Class 对象。 验证：校验字节码的合法性（魔数、版本、语义）。 准备：为类的静态变量分配内存并赋默认值（零值），final static 在编译期已赋值。 解析：把符号引用替换为直接引用。 初始化：执行 \u003Cclinit> 方法，","2026-09-16T09:13:36.695610Z",[670],{"metadata":671,"spec":674,"status":675,"postCount":88},{"name":220,"creationTimestamp":635,"labels":672,"annotations":673},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":322},{"displayName":639,"slug":220,"cover":9,"description":640,"priority":641,"hideFromList":309,"preventParentPostCascadeQuery":309},{"permalink":643,"postCount":88,"visiblePostCount":88},[677,680,683],{"metadata":678,"spec":679},{"name":217},{"displayName":219,"slug":220},{"metadata":681,"spec":682},{"name":112},{"displayName":114,"slug":115},{"metadata":684,"spec":685},{"name":119},{"displayName":121,"slug":122},{"metadata":687,"spec":690,"status":697,"categories":701,"tags":708},{"name":688,"creationTimestamp":689},"post-jvm-cms-vs-g1-a6ba005b","2026-09-13T10:00:58.169843Z",{"title":691,"slug":692,"cover":9,"excerpt":693,"publishTime":694,"categories":695,"tags":696,"priority":42,"pinned":309,"deleted":309,"visible":310,"allowComment":304},"CMS 和 G1 的区别？","jvm-cms-vs-g1",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:58.215157Z",[220],[119,217,112],{"permalink":698,"excerpt":699,"lastModifyTime":700,"phase":315},"\u002Farchives\u002Fjvm-cms-vs-g1","一、CMS 基于标记-清除算法。 以最短停顿时间为目标。 流程：初始标记（STW）→ 并发标记 → 重新标记（STW）→ 并发清除。 缺点：内存碎片、并发阶段消耗 CPU、浮动垃圾、可能 Concurrent Mode Failure 退化为 Serial Old。 二、G1 把堆分成多个 Regi","2026-09-16T09:12:31.222727Z",[702],{"metadata":703,"spec":706,"status":707,"postCount":88},{"name":220,"creationTimestamp":635,"labels":704,"annotations":705},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":322},{"displayName":639,"slug":220,"cover":9,"description":640,"priority":641,"hideFromList":309,"preventParentPostCascadeQuery":309},{"permalink":643,"postCount":88,"visiblePostCount":88},[709,712,715],{"metadata":710,"spec":711},{"name":119},{"displayName":121,"slug":122},{"metadata":713,"spec":714},{"name":217},{"displayName":219,"slug":220},{"metadata":716,"spec":717},{"name":112},{"displayName":114,"slug":115},{"metadata":719,"spec":722,"status":729,"categories":733,"tags":740},{"name":720,"creationTimestamp":721},"post-jvm-gc-algorithms-f3d021b9","2026-09-13T10:00:57.985775Z",{"title":723,"slug":724,"cover":9,"excerpt":725,"publishTime":726,"categories":727,"tags":728,"priority":42,"pinned":309,"deleted":309,"visible":310,"allowComment":304},"常见的垃圾回收算法？","jvm-gc-algorithms",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:58.037353Z",[220],[112,119,217],{"permalink":730,"excerpt":731,"lastModifyTime":732,"phase":315},"\u002Farchives\u002Fjvm-gc-algorithms","一、判断对象是否可回收 引用计数法：对象被引用计数 +1，为 0 则回收。无法解决循环引用。 可达性分析：从 GC Roots 出发，不可达的对象可回收。GC Roots 包括栈中引用、静态变量、常量、JNI 引用。 二、回收算法 标记-清除：标记存活对象，清除垃圾。缺点：内存碎片。 标记-复制：内","2026-09-16T09:13:37.177956Z",[734],{"metadata":735,"spec":738,"status":739,"postCount":88},{"name":220,"creationTimestamp":635,"labels":736,"annotations":737},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":322},{"displayName":639,"slug":220,"cover":9,"description":640,"priority":641,"hideFromList":309,"preventParentPostCascadeQuery":309},{"permalink":643,"postCount":88,"visiblePostCount":88},[741,744,747],{"metadata":742,"spec":743},{"name":112},{"displayName":114,"slug":115},{"metadata":745,"spec":746},{"name":119},{"displayName":121,"slug":122},{"metadata":748,"spec":749},{"name":217},{"displayName":219,"slug":220},{"metadata":751,"spec":754,"status":761,"categories":765,"tags":772},{"name":752,"creationTimestamp":753},"post-jvm-memory-structure-42710c3c","2026-09-13T10:00:57.786002Z",{"title":755,"slug":756,"cover":9,"excerpt":757,"publishTime":758,"categories":759,"tags":760,"priority":42,"pinned":309,"deleted":309,"visible":310,"allowComment":304},"JVM 运行时内存结构？","jvm-memory-structure",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:57.832357Z",[220],[112,119,217],{"permalink":762,"excerpt":763,"lastModifyTime":764,"phase":315},"\u002Farchives\u002Fjvm-memory-structure","一、线程私有 程序计数器：记录当前线程执行的字节码行号，唯一不会 OOM 的区域。 虚拟机栈：每个方法调用创建一个栈帧，存局部变量、操作数栈、动态链接。栈深度过深抛 StackOverflowError。 本地方法栈：为 native 方法服务。 二、线程共享 堆：对象实例和数组，GC 主要区域，可","2026-09-16T09:13:37.671380Z",[766],{"metadata":767,"spec":770,"status":771,"postCount":88},{"name":220,"creationTimestamp":635,"labels":768,"annotations":769},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":322},{"displayName":639,"slug":220,"cover":9,"description":640,"priority":641,"hideFromList":309,"preventParentPostCascadeQuery":309},{"permalink":643,"postCount":88,"visiblePostCount":88},[773,776,779],{"metadata":774,"spec":775},{"name":112},{"displayName":114,"slug":115},{"metadata":777,"spec":778},{"name":119},{"displayName":121,"slug":122},{"metadata":780,"spec":781},{"name":217},{"displayName":219,"slug":220},{"metadata":783,"spec":786,"status":793,"categories":797,"tags":809},{"name":784,"creationTimestamp":785},"post-redis-single-thread-d67c91bd","2026-09-13T10:00:57.608185Z",{"title":787,"slug":788,"cover":9,"excerpt":789,"publishTime":790,"categories":791,"tags":792,"priority":42,"pinned":309,"deleted":309,"visible":310,"allowComment":304},"Redis 为什么单线程还这么快？","redis-single-thread",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:57.655030Z",[208],[205,112],{"permalink":794,"excerpt":795,"lastModifyTime":796,"phase":315},"\u002Farchives\u002Fredis-single-thread","一、核心原因 纯内存操作：数据在内存中，访问速度极快。 I\u002FO 多路复用：用 epoll 处理大量并发连接，单线程也能处理高并发。 避免上下文切换：单线程没有线程切换开销，也没有锁竞争。 二、Redis 6.0 多线程 Redis 6.0 引入多线程，但只用于网络 I\u002FO 的读写，命令执行仍是单线程","2026-09-16T09:13:51.386377Z",[798],{"metadata":799,"spec":803,"status":807,"postCount":88},{"name":208,"creationTimestamp":800,"labels":801,"annotations":802},"2026-09-13T09:13:25.567674Z",{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":322},{"displayName":804,"slug":208,"cover":9,"description":805,"priority":806,"hideFromList":309,"preventParentPostCascadeQuery":309},"Redis 面试题","Redis 面试题：数据结构与底层实现、持久化、主从集群、缓存设计与分布式锁。",12,{"permalink":808,"postCount":88,"visiblePostCount":88},"\u002Fcategories\u002Fredis",[810,813],{"metadata":811,"spec":812},{"name":205},{"displayName":207,"slug":208},{"metadata":814,"spec":815},{"name":112},{"displayName":114,"slug":115},{"metadata":817,"spec":820,"status":827,"categories":831,"tags":838},{"name":818,"creationTimestamp":819},"post-redis-distributed-lock-b83520e6","2026-09-13T10:00:57.413537Z",{"title":821,"slug":822,"cover":9,"excerpt":823,"publishTime":824,"categories":825,"tags":826,"priority":42,"pinned":309,"deleted":309,"visible":310,"allowComment":304},"Redis 如何实现分布式锁？","redis-distributed-lock",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:57.460603Z",[208],[205,112],{"permalink":828,"excerpt":829,"lastModifyTime":830,"phase":315},"\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",[832],{"metadata":833,"spec":836,"status":837,"postCount":88},{"name":208,"creationTimestamp":800,"labels":834,"annotations":835},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":322},{"displayName":804,"slug":208,"cover":9,"description":805,"priority":806,"hideFromList":309,"preventParentPostCascadeQuery":309},{"permalink":808,"postCount":88,"visiblePostCount":88},[839,842],{"metadata":840,"spec":841},{"name":205},{"displayName":207,"slug":208},{"metadata":843,"spec":844},{"name":112},{"displayName":114,"slug":115},{"metadata":846,"spec":849,"status":856,"categories":860,"tags":867},{"name":847,"creationTimestamp":848},"post-redis-cache-penetration-83ba9eca","2026-09-13T10:00:57.240970Z",{"title":850,"slug":851,"cover":9,"excerpt":852,"publishTime":853,"categories":854,"tags":855,"priority":42,"pinned":309,"deleted":309,"visible":310,"allowComment":304},"缓存穿透、击穿、雪崩及解决方案？","redis-cache-penetration",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:57.284484Z",[208],[205,112],{"permalink":857,"excerpt":858,"lastModifyTime":859,"phase":315},"\u002Farchives\u002Fredis-cache-penetration","一、缓存穿透 查询不存在的数据，缓存和数据库都没有，请求全打到数据库。 解决方案： - 缓存空值（设置较短过期时间）。 - 布隆过滤器，不存在的 key 直接拦截。 二、缓存击穿 热点 key 过期瞬间，大量并发请求打到数据库。 解决方案： - 互斥锁（setnx），只有一个请求查库并回填缓存。 -","2026-09-16T09:13:38.128100Z",[861],{"metadata":862,"spec":865,"status":866,"postCount":88},{"name":208,"creationTimestamp":800,"labels":863,"annotations":864},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":322},{"displayName":804,"slug":208,"cover":9,"description":805,"priority":806,"hideFromList":309,"preventParentPostCascadeQuery":309},{"permalink":808,"postCount":88,"visiblePostCount":88},[868,871],{"metadata":869,"spec":870},{"name":205},{"displayName":207,"slug":208},{"metadata":872,"spec":873},{"name":112},{"displayName":114,"slug":115},{"metadata":875,"spec":878,"status":885,"categories":889,"tags":896},{"name":876,"creationTimestamp":877},"post-redis-persistence-c40c1a6e","2026-09-13T10:00:57.060111Z",{"title":879,"slug":880,"cover":9,"excerpt":881,"publishTime":882,"categories":883,"tags":884,"priority":42,"pinned":309,"deleted":309,"visible":310,"allowComment":304},"Redis 的持久化方式有哪些？","redis-persistence",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:57.107399Z",[208],[205,112],{"permalink":886,"excerpt":887,"lastModifyTime":888,"phase":315},"\u002Farchives\u002Fredis-persistence","一、RDB（快照） 原理：在某个时间点把内存数据序列化写入 dump.rdb。 触发：save（阻塞）、bgsave（fork 子进程）、自动配置（save 900 1）。 优点：文件紧凑、恢复快。 缺点：可能丢失最后一次快照后的数据。 二、AOF（追加日志） 原理：把写命令追加到 appendon","2026-09-16T09:12:30.734646Z",[890],{"metadata":891,"spec":894,"status":895,"postCount":88},{"name":208,"creationTimestamp":800,"labels":892,"annotations":893},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":322},{"displayName":804,"slug":208,"cover":9,"description":805,"priority":806,"hideFromList":309,"preventParentPostCascadeQuery":309},{"permalink":808,"postCount":88,"visiblePostCount":88},[897,900],{"metadata":898,"spec":899},{"name":205},{"displayName":207,"slug":208},{"metadata":901,"spec":902},{"name":112},{"displayName":114,"slug":115},{"metadata":904,"spec":907,"status":914,"categories":918,"tags":925},{"name":905,"creationTimestamp":906},"post-redis-data-structures-ce205a8f","2026-09-13T10:00:56.752073Z",{"title":908,"slug":909,"cover":9,"excerpt":910,"publishTime":911,"categories":912,"tags":913,"priority":42,"pinned":309,"deleted":309,"visible":310,"allowComment":304},"Redis 常见数据结构及使用场景？","redis-data-structures",{"raw":9,"autoGenerate":304},"2026-09-13T10:00:56.927778Z",[208],[112,205],{"permalink":915,"excerpt":916,"lastModifyTime":917,"phase":315},"\u002Farchives\u002Fredis-data-structures","一、String 最基础，存字符串\u002F整数\u002F二进制。场景：缓存、计数器（incr）、分布式锁（setnx）、限流。 二、List 双向链表。场景：消息队列（lpush\u002Fbrpop）、最新列表。 三、Hash 键值对集合。场景：对象存储（用户信息）、购物车。 四、Set 无序去重集合。场景：标签、共同好","2026-09-16T09:13:50.934425Z",[919],{"metadata":920,"spec":923,"status":924,"postCount":88},{"name":208,"creationTimestamp":800,"labels":921,"annotations":922},{"haloweb.section":115},{"tutorial.halo.run\u002Fstatus":322},{"displayName":804,"slug":208,"cover":9,"description":805,"priority":806,"hideFromList":309,"preventParentPostCascadeQuery":309},{"permalink":808,"postCount":88,"visiblePostCount":88},[926,929],{"metadata":927,"spec":928},{"name":112},{"displayName":114,"slug":115},{"metadata":930,"spec":931},{"name":205},{"displayName":207,"slug":208}]