{"id":63884,"date":"2026-01-22T14:40:33","date_gmt":"2026-01-22T06:40:33","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/63884.html"},"modified":"2026-01-22T14:40:33","modified_gmt":"2026-01-22T06:40:33","slug":"%e7%bc%93%e5%ad%98%e7%a9%bf%e9%80%8f%e3%80%81%e9%9b%aa%e5%b4%a9%e3%80%81%e5%87%bb%e7%a9%bf%ef%bc%9a%e4%b8%89%e5%a4%a7%e6%95%85%e9%9a%9c%e5%85%a8%e8%a7%a3%e6%9e%90","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/63884.html","title":{"rendered":"\u7f13\u5b58\u7a7f\u900f\u3001\u96ea\u5d29\u3001\u51fb\u7a7f\uff1a\u4e09\u5927\u6545\u969c\u5168\u89e3\u6790"},"content":{"rendered":"<h4>\u7f13\u5b58\u7a7f\u900f \u7f13\u5b58\u96ea\u5d29 \u7f13\u5b58\u51fb\u7a7f\u8fd9\u4e09\u8005\u662f\u7f13\u5b58\u67b6\u6784\u4e2d\u6700\u5e38\u89c1\u7684\u4e09\u7c7b\u6545\u969c\u573a\u666f&#xff0c;\u6838\u5fc3\u5dee\u5f02\u5728\u4e8e\u89e6\u53d1\u539f\u56e0\u3001\u5f71\u54cd\u8303\u56f4\u548c\u5e94\u5bf9\u7b56\u7565&#xff0c;\u4ece\u5e95\u5c42\u539f\u7406\u5230\u89e3\u51b3\u65b9\u6848\u53ef\u4ee5\u8fd9\u6837\u62c6\u89e3&#xff1a;<\/h4>\n<h4>\u4e00\u3001 \u7f13\u5b58\u7a7f\u900f<\/h4>\n<h5>1. \u5b9a\u4e49<\/h5>\n<p>\u6307\u8bf7\u6c42\u7684\u6570\u636e\u5728\u7f13\u5b58\u548c\u6570\u636e\u5e93\u4e2d\u90fd\u4e0d\u5b58\u5728&#xff0c;\u6bcf\u6b21\u8bf7\u6c42\u90fd\u4f1a\u7a7f\u900f\u7f13\u5b58\u76f4\u63a5\u6253\u5230\u6570\u636e\u5e93&#xff0c;\u5bfc\u81f4\u6570\u636e\u5e93\u538b\u529b\u9aa4\u589e&#xff0c;\u751a\u81f3\u88ab\u6253\u57ae\u3002<\/p>\n<ul>\n<li>\u5178\u578b\u573a\u666f&#xff1a;\u6076\u610f\u653b\u51fb&#xff08;\u5982\u6784\u9020\u5927\u91cf\u4e0d\u5b58\u5728\u7684 key \u53d1\u8d77\u8bf7\u6c42&#xff09;\u3001\u4e1a\u52a1\u903b\u8f91\u758f\u6f0f&#xff08;\u5982\u67e5\u8be2\u53c2\u6570\u9519\u8bef&#xff09;\u3002<\/li>\n<li>\u5e95\u5c42\u5f71\u54cd&#xff1a;\u7f13\u5b58\u547d\u4e2d\u7387\u6781\u4f4e&#xff0c;\u6570\u636e\u5e93\u9891\u7e41\u6267\u884c\u65e0\u610f\u4e49\u7684\u67e5\u8be2&#xff0c;\u8fde\u63a5\u6c60\u88ab\u5360\u6ee1&#xff0c;\u6b63\u5e38\u8bf7\u6c42\u65e0\u6cd5\u54cd\u5e94\u3002<br \/>\n<h5>2. \u6838\u5fc3\u5e94\u5bf9\u7b56\u7565<\/h5>\n<table>\n<tr>\u7b56\u7565\u539f\u7406\u4f18\u7f3a\u70b9<\/tr>\n<tbody>\n<tr>\n<td>\u7a7a\u503c\u7f13\u5b58<\/td>\n<td>\u6570\u636e\u5e93\u67e5\u8be2\u4e3a\u7a7a\u65f6&#xff0c;\u5c06 key \u5bf9\u5e94\u7684\u7a7a\u503c&#xff08;\u5982 null&#xff09;\u5199\u5165\u7f13\u5b58&#xff0c;\u5e76\u8bbe\u7f6e\u77ed\u8fc7\u671f\u65f6\u95f4&#xff08;\u5982 5 \u5206\u949f&#xff09;<\/td>\n<td>\u4f18\u70b9&#xff1a;\u5b9e\u73b0\u7b80\u5355&#xff1b;\u7f3a\u70b9&#xff1a;\u4f1a\u5360\u7528\u5c11\u91cf\u7f13\u5b58\u7a7a\u95f4&#xff0c;\u53ef\u80fd\u88ab\u6076\u610f key \u6491\u7206<\/td>\n<\/tr>\n<tr>\n<td>\u5e03\u9686\u8fc7\u6ee4\u5668<\/td>\n<td>\u542f\u52a8\u65f6\u5c06\u6570\u636e\u5e93\u4e2d\u6240\u6709\u6709\u6548 key \u9884\u52a0\u8f7d\u5230\u5e03\u9686\u8fc7\u6ee4\u5668\u4e2d&#xff0c;\u8bf7\u6c42\u5148\u7ecf\u8fc7\u8fc7\u6ee4\u5668\u6821\u9a8c&#xff0c;\u4e0d\u5b58\u5728\u7684 key \u76f4\u63a5\u62e6\u622a<\/td>\n<td>\u4f18\u70b9&#xff1a;\u7a7a\u95f4\u6548\u7387\u6781\u9ad8&#xff0c;\u62e6\u622a\u6548\u7387\u63a5\u8fd1 100%&#xff1b;\u7f3a\u70b9&#xff1a;\u5b58\u5728\u8bef\u5224\u7387&#xff08;\u65e0\u6cd5\u533a\u5206 \u201c\u4e00\u5b9a\u4e0d\u5b58\u5728\u201d \u548c \u201c\u53ef\u80fd\u5b58\u5728\u201d&#xff09;&#xff0c;\u4e0d\u652f\u6301\u5220\u9664\u64cd\u4f5c<\/td>\n<\/tr>\n<tr>\n<td>\u8bf7\u6c42\u9650\u6d41 \/ \u6821\u9a8c<\/td>\n<td>\u5bf9\u63a5\u53e3\u505a\u53c2\u6570\u5408\u6cd5\u6027\u6821\u9a8c&#xff0c;\u5bf9\u5f02\u5e38\u8bf7\u6c42\u9891\u7387\u7684 IP \u8fdb\u884c\u9650\u6d41<\/td>\n<td>\u4f18\u70b9&#xff1a;\u4ece\u6e90\u5934\u62e6\u622a\u6076\u610f\u8bf7\u6c42&#xff1b;\u7f3a\u70b9&#xff1a;\u65e0\u6cd5\u5e94\u5bf9\u6b63\u5e38\u4e1a\u52a1\u7684\u65e0\u6548\u67e5\u8be2<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ul>\n<p>3. \u4ee3\u7801\u793a\u4f8b&#xff08;\u7a7a\u503c\u7f13\u5b58&#xff09;<\/p>\n<p>public Object getValue(String key) {<br \/>\n    \/\/ 1. \u5148\u67e5\u7f13\u5b58<br \/>\n    Object cacheValue &#061; redisTemplate.opsForValue().get(key);<br \/>\n    if (cacheValue !&#061; null) {<br \/>\n        return cacheValue;<br \/>\n    }<br \/>\n    \/\/ 2. \u7f13\u5b58\u672a\u547d\u4e2d&#xff0c;\u67e5\u6570\u636e\u5e93<br \/>\n    Object dbValue &#061; dbMapper.selectByKey(key);<br \/>\n    if (dbValue &#061;&#061; null) {<br \/>\n        \/\/ 3. \u6570\u636e\u5e93\u65e0\u6570\u636e&#xff0c;\u7f13\u5b58\u7a7a\u503c\u5e76\u8bbe\u7f6e\u77ed\u8fc7\u671f\u65f6\u95f4<br \/>\n        redisTemplate.opsForValue().set(key, null, 5, TimeUnit.MINUTES);<br \/>\n        return null;<br \/>\n    }<br \/>\n    \/\/ 4. \u6570\u636e\u5e93\u6709\u6570\u636e&#xff0c;\u7f13\u5b58\u5e76\u8fd4\u56de<br \/>\n    redisTemplate.opsForValue().set(key, dbValue, 30, TimeUnit.MINUTES);<br \/>\n    return dbValue;<br \/>\n} <\/p>\n<h4>\u4e8c\u3001 \u7f13\u5b58\u96ea\u5d29<\/h4>\n<h5>1. \u5b9a\u4e49<\/h5>\n<p>\u6307\u5927\u91cf\u7f13\u5b58\u6570\u636e\u5728\u540c\u4e00\u65f6\u95f4\u70b9\u8fc7\u671f&#xff0c;\u5bfc\u81f4\u6240\u6709\u8bf7\u6c42\u77ac\u95f4\u7a7f\u900f\u5230\u6570\u636e\u5e93&#xff0c;\u6570\u636e\u5e93\u56e0\u538b\u529b\u8fc7\u8f7d\u800c\u5b95\u673a&#xff0c;\u8fdb\u800c\u5f15\u53d1\u6574\u4e2a\u7cfb\u7edf\u96ea\u5d29\u3002<\/p>\n<ul>\n<li>\u5178\u578b\u573a\u666f&#xff1a;\u7f13\u5b58\u96c6\u7fa4\u91cd\u542f\u3001\u6279\u91cf\u8bbe\u7f6e\u76f8\u540c\u7684\u8fc7\u671f\u65f6\u95f4&#xff08;\u5982\u4fc3\u9500\u6d3b\u52a8\u7ed3\u675f\u65f6\u95f4\u7edf\u4e00&#xff09;\u3002<\/li>\n<li>\u5e95\u5c42\u5f71\u54cd&#xff1a;\u77ed\u65f6\u95f4\u5185\u6570\u636e\u5e93\u8bf7\u6c42\u91cf\u98d9\u5347&#xff0c;CPU\/IO \u6253\u6ee1&#xff0c;\u670d\u52a1\u96ea\u5d29\u6548\u5e94&#xff08;\u4e00\u5c42\u6545\u969c\u8513\u5ef6\u5230\u591a\u5c42&#xff09;\u3002<\/li>\n<\/ul>\n<h5>2. \u6838\u5fc3\u5e94\u5bf9\u7b56\u7565<\/h5>\n<table>\n<tr>\u7b56\u7565\u539f\u7406\u4f18\u7f3a\u70b9<\/tr>\n<tbody>\n<tr>\n<td>\u8fc7\u671f\u65f6\u95f4\u968f\u673a\u5316<\/td>\n<td>\u7ed9\u6bcf\u4e2a key \u7684\u8fc7\u671f\u65f6\u95f4\u589e\u52a0\u968f\u673a\u504f\u79fb\u91cf&#xff08;\u5982\u57fa\u7840\u8fc7\u671f\u65f6\u95f4 30 \u5206\u949f \u00b1 5 \u5206\u949f&#xff09;&#xff0c;\u907f\u514d\u96c6\u4e2d\u8fc7\u671f<\/td>\n<td>\u4f18\u70b9&#xff1a;\u5b9e\u73b0\u7b80\u5355&#xff0c;\u65e0\u989d\u5916\u6210\u672c&#xff1b;\u7f3a\u70b9&#xff1a;\u65e0\u6cd5\u89e3\u51b3\u7f13\u5b58\u96c6\u7fa4\u5b95\u673a\u7684\u573a\u666f<\/td>\n<\/tr>\n<tr>\n<td>\u591a\u7ea7\u7f13\u5b58\u67b6\u6784<\/td>\n<td>\u5f15\u5165\u672c\u5730\u7f13\u5b58&#xff08;\u5982 Caffeine&#xff09; &#043; \u5206\u5e03\u5f0f\u7f13\u5b58&#xff08;\u5982 Redis&#xff09;&#xff0c;\u5206\u5e03\u5f0f\u7f13\u5b58\u5931\u6548\u65f6&#xff0c;\u672c\u5730\u7f13\u5b58\u53ef\u515c\u5e95<\/td>\n<td>\u4f18\u70b9&#xff1a;\u964d\u4f4e\u5206\u5e03\u5f0f\u7f13\u5b58\u4f9d\u8d56&#xff1b;\u7f3a\u70b9&#xff1a;\u672c\u5730\u7f13\u5b58\u5b58\u5728\u4e00\u81f4\u6027\u95ee\u9898&#xff0c;\u5360\u7528 JVM \u5806\u5185\u5b58<\/td>\n<\/tr>\n<tr>\n<td>\u7f13\u5b58\u9884\u70ed &#043; \u964d\u7ea7\u9650\u6d41<\/td>\n<td>\u7cfb\u7edf\u542f\u52a8\u524d\u63d0\u524d\u52a0\u8f7d\u70ed\u70b9\u6570\u636e\u5230\u7f13\u5b58&#xff1b;\u7f13\u5b58\u5931\u6548\u65f6&#xff0c;\u5bf9\u6570\u636e\u5e93\u8bf7\u6c42\u8fdb\u884c\u9650\u6d41\u964d\u7ea7&#xff0c;\u8fd4\u56de\u515c\u5e95\u6570\u636e<\/td>\n<td>\u4f18\u70b9&#xff1a;\u5e94\u5bf9\u7a81\u53d1\u6d41\u91cf&#xff1b;\u7f3a\u70b9&#xff1a;\u5b9e\u73b0\u590d\u6742&#xff0c;\u9700\u8981\u914d\u5957\u76d1\u63a7\u548c\u7194\u65ad\u673a\u5236<\/td>\n<\/tr>\n<tr>\n<td>\u96c6\u7fa4\u9ad8\u53ef\u7528<\/td>\n<td>\u4f7f\u7528 Redis \u54e8\u5175 \/ \u96c6\u7fa4\u6a21\u5f0f&#xff0c;\u907f\u514d\u5355\u8282\u70b9\u5b95\u673a\u5bfc\u81f4\u7684\u7f13\u5b58\u5168\u91cf\u5931\u6548<\/td>\n<td>\u4f18\u70b9&#xff1a;\u89e3\u51b3\u786c\u4ef6\u6545\u969c&#xff1b;\u7f3a\u70b9&#xff1a;\u65e0\u6cd5\u89e3\u51b3\u4e1a\u52a1\u5c42\u7684\u96c6\u4e2d\u8fc7\u671f\u95ee\u9898<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>3. \u4ee3\u7801\u793a\u4f8b&#xff08;\u8fc7\u671f\u65f6\u95f4\u968f\u673a\u5316&#xff09;<\/p>\n<p>public void setValue(String key, Object value) {<br \/>\n    \/\/ \u57fa\u7840\u8fc7\u671f\u65f6\u95f4 30 \u5206\u949f&#xff0c;\u968f\u673a\u504f\u79fb 0-5 \u5206\u949f<br \/>\n    int baseExpire &#061; 30 * 60;<br \/>\n    int randomExpire &#061; new Random().nextInt(5 * 60);<br \/>\n    int totalExpire &#061; baseExpire &#043; randomExpire;<br \/>\n    redisTemplate.opsForValue().set(key, value, totalExpire, TimeUnit.SECONDS);<br \/>\n} <\/p>\n<h4>\u4e09\u3001 \u7f13\u5b58\u51fb\u7a7f<\/h4>\n<h5>1. \u5b9a\u4e49<\/h5>\n<p>\u6307\u67d0\u4e2a\u70ed\u70b9 key \u7a81\u7136\u8fc7\u671f&#xff0c;\u6b64\u65f6\u6070\u597d\u6709\u5927\u91cf\u5e76\u53d1\u8bf7\u6c42\u8bbf\u95ee\u8be5 key&#xff0c;\u6240\u6709\u8bf7\u6c42\u90fd\u4f1a\u7a7f\u900f\u5230\u6570\u636e\u5e93&#xff0c;\u5bfc\u81f4\u6570\u636e\u5e93\u77ac\u95f4\u538b\u529b\u66b4\u589e\u3002<\/p>\n<ul>\n<li>\u6838\u5fc3\u533a\u522b\u4e8e\u96ea\u5d29&#xff1a;\u51fb\u7a7f\u662f\u5355\u4e2a\u70ed\u70b9 key \u7684\u95ee\u9898&#xff0c;\u96ea\u5d29\u662f\u5927\u91cf key \u7684\u95ee\u9898\u3002<\/li>\n<li>\u5178\u578b\u573a\u666f&#xff1a;\u79d2\u6740\u5546\u54c1\u7684\u7f13\u5b58\u8fc7\u671f\u3001\u70ed\u95e8\u8d44\u8baf\u7684\u7f13\u5b58\u5931\u6548\u3002<\/li>\n<\/ul>\n<h5>2. \u6838\u5fc3\u5e94\u5bf9\u7b56\u7565<\/h5>\n<table>\n<tr>\u7b56\u7565\u539f\u7406\u4f18\u7f3a\u70b9<\/tr>\n<tbody>\n<tr>\n<td>\u4e92\u65a5\u9501<\/td>\n<td>\u7f13\u5b58\u672a\u547d\u4e2d\u65f6&#xff0c;\u901a\u8fc7\u5206\u5e03\u5f0f\u9501&#xff08;\u5982 Redis Redlock&#xff09;\u4fdd\u8bc1\u53ea\u6709\u4e00\u4e2a\u8bf7\u6c42\u53bb\u6570\u636e\u5e93\u67e5\u8be2\u5e76\u66f4\u65b0\u7f13\u5b58&#xff0c;\u5176\u4ed6\u8bf7\u6c42\u7b49\u5f85<\/td>\n<td>\u4f18\u70b9&#xff1a;\u903b\u8f91\u4e25\u8c28&#xff0c;\u4e00\u81f4\u6027\u5f3a&#xff1b;\u7f3a\u70b9&#xff1a;\u5b58\u5728\u9501\u7ade\u4e89&#xff0c;\u9ad8\u5e76\u53d1\u4e0b\u6709\u6027\u80fd\u635f\u8017<\/td>\n<\/tr>\n<tr>\n<td>\u70ed\u70b9\u6570\u636e\u6c38\u4e0d\u8fc7\u671f<\/td>\n<td>\u5bf9\u70ed\u70b9 key \u4e0d\u8bbe\u7f6e\u8fc7\u671f\u65f6\u95f4&#xff0c;\u7531\u540e\u53f0\u5f02\u6b65\u4efb\u52a1\u5b9a\u671f\u66f4\u65b0\u7f13\u5b58<\/td>\n<td>\u4f18\u70b9&#xff1a;\u65e0\u8fc7\u671f\u7a7f\u900f\u98ce\u9669&#xff1b;\u7f3a\u70b9&#xff1a;\u9700\u8981\u7ef4\u62a4\u70ed\u70b9 key \u5217\u8868&#xff0c;\u7f13\u5b58\u7a7a\u95f4\u5360\u7528\u8f83\u9ad8<\/td>\n<\/tr>\n<tr>\n<td>\u7f13\u5b58\u9884\u70ed &#043; \u5ef6\u957f\u8fc7\u671f\u65f6\u95f4<\/td>\n<td>\u63d0\u524d\u5c06\u70ed\u70b9\u6570\u636e\u52a0\u8f7d\u5230\u7f13\u5b58&#xff0c;\u5e76\u8bbe\u7f6e\u8f83\u957f\u7684\u8fc7\u671f\u65f6\u95f4&#xff0c;\u7ed3\u5408\u76d1\u63a7\u5b9e\u65f6\u5237\u65b0<\/td>\n<td>\u4f18\u70b9&#xff1a;\u7b80\u5355\u9ad8\u6548&#xff1b;\u7f3a\u70b9&#xff1a;\u4f9d\u8d56\u70ed\u70b9\u6570\u636e\u7684\u9884\u5224\u80fd\u529b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>3. \u4ee3\u7801\u793a\u4f8b&#xff08;\u4e92\u65a5\u9501\u65b9\u6848&#xff09;<\/p>\n<p>public Object getHotValue(String key) {<br \/>\n    \/\/ 1. \u67e5\u7f13\u5b58<br \/>\n    Object cacheValue &#061; redisTemplate.opsForValue().get(key);<br \/>\n    if (cacheValue !&#061; null) {<br \/>\n        return cacheValue;<br \/>\n    }<br \/>\n    \/\/ 2. \u7f13\u5b58\u672a\u547d\u4e2d&#xff0c;\u52a0\u5206\u5e03\u5f0f\u9501<br \/>\n    String lockKey &#061; &#034;lock:&#034; &#043; key;<br \/>\n    Boolean lock &#061; redisTemplate.opsForValue().setIfAbsent(lockKey, &#034;1&#034;, 3, TimeUnit.SECONDS);<br \/>\n    if (lock !&#061; null &amp;&amp; lock) {<br \/>\n        try {<br \/>\n            \/\/ 3. \u62ff\u5230\u9501&#xff0c;\u67e5\u6570\u636e\u5e93\u5e76\u66f4\u65b0\u7f13\u5b58<br \/>\n            Object dbValue &#061; dbMapper.selectByKey(key);<br \/>\n            redisTemplate.opsForValue().set(key, dbValue, 30, TimeUnit.MINUTES);<br \/>\n            return dbValue;<br \/>\n        } finally {<br \/>\n            \/\/ 4. \u91ca\u653e\u9501<br \/>\n            redisTemplate.delete(lockKey);<br \/>\n        }<br \/>\n    } else {<br \/>\n        \/\/ 5. \u672a\u62ff\u5230\u9501&#xff0c;\u81ea\u65cb\u7b49\u5f85&#xff08;\u6216\u8fd4\u56de\u515c\u5e95\u6570\u636e&#xff09;<br \/>\n        Thread.sleep(50);<br \/>\n        return getHotValue(key);<br \/>\n    }<br \/>\n} <\/p>\n<h4>\u56db\u3001 \u4e09\u8005\u6838\u5fc3\u533a\u522b\u603b\u7ed3<\/h4>\n<table>\n<tr>\u7ef4\u5ea6\u7f13\u5b58\u7a7f\u900f\u7f13\u5b58\u96ea\u5d29\u7f13\u5b58\u51fb\u7a7f<\/tr>\n<tbody>\n<tr>\n<td>\u6570\u636e\u5b58\u5728\u6027<\/td>\n<td>\u7f13\u5b58 &#043; \u6570\u636e\u5e93\u90fd\u4e0d\u5b58\u5728<\/td>\n<td>\u7f13\u5b58\u5b58\u5728&#xff0c;\u6279\u91cf\u8fc7\u671f<\/td>\n<td>\u7f13\u5b58\u8fc7\u671f&#xff0c;\u6570\u636e\u5e93\u5b58\u5728<\/td>\n<\/tr>\n<tr>\n<td>\u5f71\u54cd\u8303\u56f4<\/td>\n<td>\u6240\u6709\u65e0\u6548 key \u7684\u8bf7\u6c42<\/td>\n<td>\u6240\u6709\u8bf7\u6c42<\/td>\n<td>\u5355\u4e2a\u70ed\u70b9 key \u7684\u8bf7\u6c42<\/td>\n<\/tr>\n<tr>\n<td>\u89e6\u53d1\u539f\u56e0<\/td>\n<td>\u6076\u610f\u653b\u51fb \/ \u4e1a\u52a1\u758f\u6f0f<\/td>\n<td>\u96c6\u4e2d\u8fc7\u671f \/ \u96c6\u7fa4\u5b95\u673a<\/td>\n<td>\u70ed\u70b9 key \u8fc7\u671f &#043; \u9ad8\u5e76\u53d1<\/td>\n<\/tr>\n<tr>\n<td>\u6838\u5fc3\u5173\u952e\u8bcd<\/td>\n<td>\u7a7a\u503c\u3001\u5e03\u9686\u8fc7\u6ee4\u5668<\/td>\n<td>\u968f\u673a\u8fc7\u671f\u3001\u591a\u7ea7\u7f13\u5b58<\/td>\n<td>\u5206\u5e03\u5f0f\u9501\u3001\u70ed\u70b9\u6c38\u4e0d\u8fc7\u671f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>\u7f13\u5b58\u7a7f\u900f \u7f13\u5b58\u96ea\u5d29 \u7f13\u5b58\u51fb\u7a7f\u8fd9\u4e09\u8005\u662f\u7f13\u5b58\u67b6\u6784\u4e2d\u6700\u5e38\u89c1\u7684\u4e09\u7c7b\u6545\u969c\u573a\u666f&#xff0c;\u6838\u5fc3\u5dee\u5f02\u5728\u4e8e\u89e6\u53d1\u539f\u56e0\u3001\u5f71\u54cd\u8303\u56f4\u548c\u5e94\u5bf9\u7b56\u7565&#xff0c;\u4ece\u5e95\u5c42\u539f\u7406\u5230\u89e3\u51b3\u65b9\u6848\u53ef\u4ee5\u8fd9\u6837\u62c6\u89e3&#xff1a;<br \/>\n\u4e00\u3001 \u7f13\u5b58\u7a7f\u900f<br \/>\n1. \u5b9a\u4e49<br \/>\n\u6307\u8bf7\u6c42\u7684\u6570\u636e\u5728\u7f13\u5b58\u548c\u6570\u636e\u5e93\u4e2d\u90fd\u4e0d\u5b58\u5728&#xff0c;\u6bcf\u6b21\u8bf7\u6c42\u90fd\u4f1a\u7a7f\u900f\u7f13\u5b58\u76f4\u63a5\u6253\u5230\u6570\u636e\u5e93&#xff0c;\u5bfc\u81f4\u6570\u636e\u5e93\u538b\u529b\u9aa4\u589e&#xff0c;\u751a\u81f3\u88ab\u6253\u57ae\u3002<br \/>\n\u5178\u578b\u573a\u666f&#xff1a;\u6076\u610f\u653b\u51fb&#xff08;\u5982\u6784\u9020\u5927\u91cf\u4e0d\u5b58\u5728\u7684 key \u53d1\u8d77\u8bf7\u6c42&#xff09;\u3001\u4e1a\u52a1<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[99,105,398],"topic":[],"class_list":["post-63884","post","type-post","status-publish","format-standard","hentry","category-server","tag-java","tag-redis","tag-398"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u7f13\u5b58\u7a7f\u900f\u3001\u96ea\u5d29\u3001\u51fb\u7a7f\uff1a\u4e09\u5927\u6545\u969c\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/63884.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u7f13\u5b58\u7a7f\u900f\u3001\u96ea\u5d29\u3001\u51fb\u7a7f\uff1a\u4e09\u5927\u6545\u969c\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u7f13\u5b58\u7a7f\u900f \u7f13\u5b58\u96ea\u5d29 \u7f13\u5b58\u51fb\u7a7f\u8fd9\u4e09\u8005\u662f\u7f13\u5b58\u67b6\u6784\u4e2d\u6700\u5e38\u89c1\u7684\u4e09\u7c7b\u6545\u969c\u573a\u666f&#xff0c;\u6838\u5fc3\u5dee\u5f02\u5728\u4e8e\u89e6\u53d1\u539f\u56e0\u3001\u5f71\u54cd\u8303\u56f4\u548c\u5e94\u5bf9\u7b56\u7565&#xff0c;\u4ece\u5e95\u5c42\u539f\u7406\u5230\u89e3\u51b3\u65b9\u6848\u53ef\u4ee5\u8fd9\u6837\u62c6\u89e3&#xff1a; \u4e00\u3001 \u7f13\u5b58\u7a7f\u900f 1. \u5b9a\u4e49 \u6307\u8bf7\u6c42\u7684\u6570\u636e\u5728\u7f13\u5b58\u548c\u6570\u636e\u5e93\u4e2d\u90fd\u4e0d\u5b58\u5728&#xff0c;\u6bcf\u6b21\u8bf7\u6c42\u90fd\u4f1a\u7a7f\u900f\u7f13\u5b58\u76f4\u63a5\u6253\u5230\u6570\u636e\u5e93&#xff0c;\u5bfc\u81f4\u6570\u636e\u5e93\u538b\u529b\u9aa4\u589e&#xff0c;\u751a\u81f3\u88ab\u6253\u57ae\u3002 \u5178\u578b\u573a\u666f&#xff1a;\u6076\u610f\u653b\u51fb&#xff08;\u5982\u6784\u9020\u5927\u91cf\u4e0d\u5b58\u5728\u7684 key \u53d1\u8d77\u8bf7\u6c42&#xff09;\u3001\u4e1a\u52a1\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/63884.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-22T06:40:33+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/63884.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/63884.html\",\"name\":\"\u7f13\u5b58\u7a7f\u900f\u3001\u96ea\u5d29\u3001\u51fb\u7a7f\uff1a\u4e09\u5927\u6545\u969c\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-22T06:40:33+00:00\",\"dateModified\":\"2026-01-22T06:40:33+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/63884.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/63884.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/63884.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u7f13\u5b58\u7a7f\u900f\u3001\u96ea\u5d29\u3001\u51fb\u7a7f\uff1a\u4e09\u5927\u6545\u969c\u5168\u89e3\u6790\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u7f13\u5b58\u7a7f\u900f\u3001\u96ea\u5d29\u3001\u51fb\u7a7f\uff1a\u4e09\u5927\u6545\u969c\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/63884.html","og_locale":"zh_CN","og_type":"article","og_title":"\u7f13\u5b58\u7a7f\u900f\u3001\u96ea\u5d29\u3001\u51fb\u7a7f\uff1a\u4e09\u5927\u6545\u969c\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u7f13\u5b58\u7a7f\u900f \u7f13\u5b58\u96ea\u5d29 \u7f13\u5b58\u51fb\u7a7f\u8fd9\u4e09\u8005\u662f\u7f13\u5b58\u67b6\u6784\u4e2d\u6700\u5e38\u89c1\u7684\u4e09\u7c7b\u6545\u969c\u573a\u666f&#xff0c;\u6838\u5fc3\u5dee\u5f02\u5728\u4e8e\u89e6\u53d1\u539f\u56e0\u3001\u5f71\u54cd\u8303\u56f4\u548c\u5e94\u5bf9\u7b56\u7565&#xff0c;\u4ece\u5e95\u5c42\u539f\u7406\u5230\u89e3\u51b3\u65b9\u6848\u53ef\u4ee5\u8fd9\u6837\u62c6\u89e3&#xff1a; \u4e00\u3001 \u7f13\u5b58\u7a7f\u900f 1. \u5b9a\u4e49 \u6307\u8bf7\u6c42\u7684\u6570\u636e\u5728\u7f13\u5b58\u548c\u6570\u636e\u5e93\u4e2d\u90fd\u4e0d\u5b58\u5728&#xff0c;\u6bcf\u6b21\u8bf7\u6c42\u90fd\u4f1a\u7a7f\u900f\u7f13\u5b58\u76f4\u63a5\u6253\u5230\u6570\u636e\u5e93&#xff0c;\u5bfc\u81f4\u6570\u636e\u5e93\u538b\u529b\u9aa4\u589e&#xff0c;\u751a\u81f3\u88ab\u6253\u57ae\u3002 \u5178\u578b\u573a\u666f&#xff1a;\u6076\u610f\u653b\u51fb&#xff08;\u5982\u6784\u9020\u5927\u91cf\u4e0d\u5b58\u5728\u7684 key \u53d1\u8d77\u8bf7\u6c42&#xff09;\u3001\u4e1a\u52a1","og_url":"https:\/\/www.wsisp.com\/helps\/63884.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-22T06:40:33+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/63884.html","url":"https:\/\/www.wsisp.com\/helps\/63884.html","name":"\u7f13\u5b58\u7a7f\u900f\u3001\u96ea\u5d29\u3001\u51fb\u7a7f\uff1a\u4e09\u5927\u6545\u969c\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-22T06:40:33+00:00","dateModified":"2026-01-22T06:40:33+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/63884.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/63884.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/63884.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u7f13\u5b58\u7a7f\u900f\u3001\u96ea\u5d29\u3001\u51fb\u7a7f\uff1a\u4e09\u5927\u6545\u969c\u5168\u89e3\u6790"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/63884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=63884"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/63884\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=63884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=63884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=63884"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=63884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}