{"id":118152,"date":"2026-10-26T14:08:56","date_gmt":"2026-10-26T06:08:56","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/118152.html"},"modified":"2026-10-26T14:08:56","modified_gmt":"2026-10-26T06:08:56","slug":"19%e4%b8%aa%e6%96%b9%e6%b3%95%e6%90%9e%e5%ae%9amap%e5%ae%89%e5%85%a8%e5%8f%96%e5%80%bc%ef%bc%8c%e5%b5%8c%e5%a5%97%e6%95%b0%e6%8d%ae%e4%b8%8d%e7%94%a8%e5%b1%82%e5%b1%82%e5%88%a4%e7%a9%ba%e5%bc%ba","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/118152.html","title":{"rendered":"19\u4e2a\u65b9\u6cd5\u641e\u5b9aMap\u5b89\u5168\u53d6\u503c\uff0c\u5d4c\u5957\u6570\u636e\u4e0d\u7528\u5c42\u5c42\u5224\u7a7a\u5f3a\u8f6c"},"content":{"rendered":"<p>&#x1f4cc; \u9ad8\u5e76\u53d1\u7cfb\u7edf\u8bbe\u8ba1&#xff1a; \u57fa\u4e8eRedis\u4e0eMQ\u7684\u79d2\u6740\u7cfb\u7edf\u67b6\u6784&#xff1a;\u5e93\u5b58\u9884\u51cf\u3001\u9632\u8d85\u5356\u4e0e\u9650\u6d41\u9632\u5237\u5168\u6d41\u7a0b\u89e3\u6790<\/p>\n<h3>&#x1f4cb; \u76ee\u5f55<\/h3>\n<ul>\n<li>\u4e00\u3001\u5de5\u5177\u7c7b\u529f\u80fd<\/li>\n<li>\u4e8c\u3001\u6240\u9700\u73af\u5883<\/li>\n<li>\u4e09\u3001\u65b9\u6cd5\u4e0e\u8c03\u7528\u793a\u4f8b&#xff08;\u6309\u9700\u8c03\u7528&#xff09;<\/li>\n<li>\u56db\u3001\u5de5\u5177\u7c7b\u6e90\u7801&#xff08;\u53ef\u76f4\u63a5\u590d\u5236&#xff09;<\/li>\n<\/ul>\n<h3>\u4e00\u3001\u5de5\u5177\u7c7b\u529f\u80fd <\/h3>\n<p>\u8bfb\u5199 Map \u4e0d\u7528\u5148\u5224\u7a7a\u3001\u4e0d\u7528\u5c42\u5c42\u5f3a\u8f6c&#xff0c;\u53d6\u4e0d\u5230\u5c31\u6309\u9ed8\u8ba4\u503c\u515c\u5e95&#xff0c;\u53e6\u7ed9\u6784\u5efa\u3001\u7ffb\u8f6c\u3001\u8fc7\u6ee4\u3001\u6620\u5c04\u3001\u5408\u5e76\u4e0e\u53bb null \u7b49\u5e38\u7528\u52a8\u4f5c&#xff0c;\u4e13\u6cbb\u5f00\u653e\u5e73\u53f0\u54cd\u5e94\u3001\u914d\u7f6e\u4e2d\u5fc3\u8fd9\u7c7b\u5d4c\u5957\u6570\u636e\u3002<\/p>\n<h3>\u4e8c\u3001\u6240\u9700\u73af\u5883 <\/h3>\n<p>JDK 17\u6216\u4ee5\u4e0a<\/p>\n<h3>\u4e09\u3001\u65b9\u6cd5\u4e0e\u8c03\u7528\u793a\u4f8b&#xff08;\u6309\u9700\u8c03\u7528&#xff09; <\/h3>\n<p>&#x1f522; \u65b9\u6cd5\u5e8f\u53f7&#xff1a;1<\/p>\n<p>&#x1f3af; \u65b9\u6cd5\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u4ece Map \u91cc\u53d6\u4e00\u4e2a\u503c&#xff0c;\u952e\u4e0d\u5b58\u5728\u548c\u952e\u5b58\u5728\u4f46\u503c\u662f null \u4e00\u5e76\u6309\u7f3a\u5931\u5904\u7406&#xff0c;\u843d\u5230\u9ed8\u8ba4\u503c<\/li>\n<li>\u53cd\u5e8f\u5217\u5316\u51fa\u6765\u7684 JSON\u3001\u5f00\u653e\u5e73\u53f0\u8fd4\u56de\u7684 Map \u91cc\u5b57\u6bb5\u5e38\u662f\u663e\u5f0f null&#xff0c;\u7528 JDK \u7684\u515c\u5e95\u63a5\u4e0d\u4f4f<\/li>\n<\/ul>\n<p>&#x1f9e9; \u65b9\u6cd5\u5b9a\u4e49&#xff1a;public static &lt;K, V&gt; V getOrDefault(Map&lt;K, V&gt; map, K key, V defaultValue)<\/p>\n<p>&#x1f5e3;\ufe0f \u5165\u53c2\u89e3\u91ca&#xff1a;public static &lt;K, V&gt; V getOrDefault(\u6e90Map, \u952e, \u9ed8\u8ba4\u503c)<\/p>\n<p>&#x1f4e4; \u8fd4\u56de\u503c\u89e3\u91ca&#xff1a;V&#xff0c;\u952e\u6709\u975e null \u503c\u65f6\u7ed9\u8be5\u503c&#xff0c;\u5426\u5219\u7ed9\u9ed8\u8ba4\u503c<\/p>\n<p>&#x1f4a1; \u8fb9\u754c\u53e3\u5f84&#xff1a;<\/p>\n<ul>\n<li>\u4e0e Map#getOrDefault \u7684\u5dee\u522b\u5c31\u5728 null \u503c\u8fd9\u4e00\u6761&#xff1a;JDK \u53ea\u5728\u952e\u7f3a\u5931\u65f6\u515c\u5e95&#xff0c;\u503c\u4e3a null \u65f6\u7167\u6837\u8fd4\u56de null<\/li>\n<li>\u8981 JDK \u7684\u539f\u8bed\u4e49\u5c31\u76f4\u63a5\u5199 map.getOrDefault(key, default)<\/li>\n<li>\u4e24\u8005\u9759\u6001\u5bfc\u5165\u6781\u6613\u6df7\u6dc6&#xff0c;\u5efa\u8bae\u4ee5 MapSafeUtils.getOrDefault \u9650\u5b9a\u8c03\u7528<\/li>\n<li>map \u4f20 null \u4e0d\u629b\u5f02\u5e38&#xff0c;\u76f4\u63a5\u7ed9\u9ed8\u8ba4\u503c<\/li>\n<\/ul>\n<p>&#x1f9ea; \u65b9\u6cd5\u793a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>getOrDefault(payInfo, &#034;channel&#034;, &#034;\u672a\u6307\u5b9a\u6e20\u9053&#034;) \u62ff\u5230 \u672a\u6307\u5b9a\u6e20\u9053&#xff0c;channel \u8fd9\u4e2a\u952e\u5728\u4f46\u503c\u662f null<\/li>\n<li>getOrDefault(payInfo, &#034;amount&#034;, 0L) \u62ff\u5230 12850<\/li>\n<li>getOrDefault(null, &#034;score&#034;, &#034;\u515c\u5e95&#034;) \u62ff\u5230 \u515c\u5e95<\/li>\n<\/ul>\n<hr \/>\n<p>&#x1f522; \u65b9\u6cd5\u5e8f\u53f7&#xff1a;2<\/p>\n<p>&#x1f3af; \u65b9\u6cd5\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u6309\u70b9\u5206\u8def\u5f84\u5728\u5d4c\u5957 Map \u91cc\u9010\u7ea7\u4e0b\u94bb&#xff0c;\u4efb\u4e00\u5c42\u65ad\u88c2\u76f4\u63a5\u843d\u5230\u9ed8\u8ba4\u503c&#xff0c;\u4e0d\u7528\u5199\u4e00\u4e32 instanceof \u52a0 get<\/li>\n<li>\u63a5\u53e3\u8fd4\u56de\u4f53\u91cc data.orderNo \u8fd9\u7c7b\u4e24\u5c42\u4ee5\u4e0a\u7684\u7ed3\u6784\u53d6\u503c\u65f6\u7528<\/li>\n<\/ul>\n<p>&#x1f9e9; \u65b9\u6cd5\u5b9a\u4e49&#xff1a;public static &lt;V&gt; V getByPath(Map&lt;String, ?&gt; root, String path, V defaultValue)<\/p>\n<p>&#x1f5e3;\ufe0f \u5165\u53c2\u89e3\u91ca&#xff1a;public static &lt;V&gt; V getByPath(\u6839Map, \u70b9\u5206\u8def\u5f84, \u9ed8\u8ba4\u503c)<\/p>\n<p>&#x1f4e4; \u8fd4\u56de\u503c\u89e3\u91ca&#xff1a;V&#xff0c;\u8def\u5f84\u8d70\u901a\u7ed9\u539f\u503c&#xff0c;\u8d70\u4e0d\u901a\u7ed9\u9ed8\u8ba4\u503c<\/p>\n<p>&#x1f4a1; \u8fb9\u754c\u53e3\u5f84&#xff1a;<\/p>\n<ul>\n<li>\u5206\u9694\u7b26\u56fa\u5b9a\u4e3a .&#xff0c;\u952e\u540d\u672c\u8eab\u542b\u70b9\u65f6\u65e0\u6cd5\u5bfb\u5740&#xff0c;\u8fd9\u7c7b\u6570\u636e\u76f4\u63a5\u7528\u5d4c\u5957 get<\/li>\n<li>\u4e2d\u95f4\u5c42\u662f\u5b57\u7b26\u4e32\u3001\u96c6\u5408\u7b49\u975e Map \u65f6\u4e5f\u5224\u4e3a\u65ad\u88c2&#xff0c;\u76f4\u63a5\u515c\u5e95<\/li>\n<li>\u662f\u65e0\u68c0\u67e5\u5f3a\u8f6c&#xff0c;\u5b9e\u9645\u7c7b\u578b\u4e0e\u58f0\u660e\u4e0d\u7b26\u65f6\u5728\u8c03\u7528\u65b9\u7684\u4f7f\u7528\u5904\u629b ClassCastException&#xff0c;\u8981\u7c7b\u578b\u4e0d\u7b26\u5373\u515c\u5e95\u8bf7\u7528 getByPathAs<\/li>\n<li>root \u4f20 null \u7ed9\u9ed8\u8ba4\u503c&#xff0c;path \u4e3a null \u6216\u7a7a\u767d\u629b IllegalArgumentException<\/li>\n<li>\u9ed8\u8ba4\u503c\u4e0d\u80fd\u4f20 Class&#xff0c;\u90a3\u6837\u4f1a\u9759\u9ed8\u8fd4\u56de\u8be5 Class \u672c\u8eab&#xff0c;\u8fd9\u91cc\u76f4\u63a5\u62e6\u6389<\/li>\n<\/ul>\n<p>&#x1f9ea; \u65b9\u6cd5\u793a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>getByPath(response, &#034;data.orderNo&#034;, &#034;(\u7f3a\u5931)&#034;) \u62ff\u5230 SO20261005001<\/li>\n<li>getByPath(null, &#034;order.no&#034;, &#034;\u6839\u4e3anull\u7ed9\u9ed8\u8ba4&#034;) \u62ff\u5230 \u6839\u4e3anull\u7ed9\u9ed8\u8ba4<\/li>\n<li>getByPath(dotted, &#034;a.b&#034;, &#034;\u53d6\u4e0d\u5230&#034;) \u62ff\u5230 \u53d6\u4e0d\u5230&#xff0c;\u952e\u540d a.b \u6574\u4f53\u542b\u70b9\u65f6\u5b9a\u4f4d\u4e0d\u5230<\/li>\n<li>getByPath(root, &#034;order.no.deeper&#034;, &#034;\u4e2d\u95f4\u5c42\u4e0d\u662fMap&#034;) \u62ff\u5230 \u4e2d\u95f4\u5c42\u4e0d\u662fMap<\/li>\n<li>getByPath(response, &#034;data.orderNo&#034;, String.class) \u629b IllegalArgumentException<\/li>\n<\/ul>\n<hr \/>\n<p>&#x1f522; \u65b9\u6cd5\u5e8f\u53f7&#xff1a;3<\/p>\n<p>&#x1f3af; \u65b9\u6cd5\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u4e09\u53c2\u7248\u7684\u7701\u7565\u5f62\u6001&#xff0c;\u53d6\u4e0d\u5230\u5c31\u7ed9 null&#xff0c;\u540e\u9762\u8fd8\u8981\u81ea\u5df1\u5224\u7a7a\u65f6\u7528<\/li>\n<li>\u6253\u65e5\u5fd7\u3001\u4e34\u65f6\u6392\u67e5\u5d4c\u5957\u7ed3\u6784\u91cc\u5230\u5e95\u6709\u6ca1\u6709\u8fd9\u4e2a\u5b57\u6bb5\u65f6\u6700\u7701\u4e8b<\/li>\n<\/ul>\n<p>&#x1f9e9; \u65b9\u6cd5\u5b9a\u4e49&#xff1a;public static &lt;V&gt; V getByPath(Map&lt;String, ?&gt; root, String path)<\/p>\n<p>&#x1f5e3;\ufe0f \u5165\u53c2\u89e3\u91ca&#xff1a;public static &lt;V&gt; V getByPath(\u6839Map, \u70b9\u5206\u8def\u5f84)<\/p>\n<p>&#x1f4e4; \u8fd4\u56de\u503c\u89e3\u91ca&#xff1a;V&#xff0c;\u8def\u5f84\u8d70\u901a\u7ed9\u539f\u503c&#xff0c;\u53d6\u4e0d\u5230\u8fd4\u56de null<\/p>\n<p>&#x1f4a1; \u8fb9\u754c\u53e3\u5f84&#xff1a;<\/p>\n<ul>\n<li>\u5185\u90e8\u5c31\u662f getByPath(root, path, null)&#xff0c;\u8def\u5f84\u53e3\u5f84\u4e0e\u65e0\u68c0\u67e5\u5f3a\u8f6c\u7684\u5751\u4e0e\u4e09\u53c2\u7248\u4e00\u81f4<\/li>\n<li>\u5206\u4e0d\u51fa\u300c\u6ca1\u6709\u8fd9\u4e2a\u952e\u300d\u548c\u300c\u952e\u7684\u503c\u662f null\u300d&#xff0c;\u4e24\u79cd\u90fd\u8fd4\u56de null<\/li>\n<li>\u63a5\u6536\u53d8\u91cf\u58f0\u660e\u6210 Object \u518d\u81ea\u5df1\u5224\u65ad\u6700\u7a33\u59a5<\/li>\n<\/ul>\n<p>&#x1f9ea; \u65b9\u6cd5\u793a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>getByPath(response, &#034;data.notExist.deep&#034;) \u62ff\u5230 null<\/li>\n<li>getByPath(response, &#034;data.orderNo.deep&#034;) \u62ff\u5230 null&#xff0c;\u4e2d\u95f4\u5c42\u5df2\u7ecf\u4e0d\u662f Map<\/li>\n<li>getByPath(response, &#034;data.rate&#034;) \u5f53 Object \u7528\u62ff\u5230 3.5<\/li>\n<li>\u540c\u4e00\u4e2a\u503c\u8d4b\u7ed9 String \u53d8\u91cf&#xff0c;\u5728\u4f7f\u7528\u5904\u629b ClassCastException<\/li>\n<\/ul>\n<hr \/>\n<p>&#x1f522; \u65b9\u6cd5\u5e8f\u53f7&#xff1a;4<\/p>\n<p>&#x1f3af; \u65b9\u6cd5\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u4e0b\u94bb\u53d6\u5230\u503c\u540e\u5148\u9a8c\u7c7b\u578b&#xff0c;\u6700\u7ec8\u503c\u4e0d\u662f\u671f\u671b\u7c7b\u578b\u65f6\u548c\u8def\u5f84\u65ad\u88c2\u4e00\u6837\u843d\u5230\u9ed8\u8ba4\u503c<\/li>\n<li>\u5d4c\u5957\u7ed3\u6784\u91cc\u5b57\u6bb5\u7c7b\u578b\u4e0d\u7a33\u5b9a&#xff0c;\u7701\u6389\u8c03\u7528\u65b9\u81ea\u5df1 try-catch \u7c7b\u578b\u8f6c\u6362\u5f02\u5e38<\/li>\n<\/ul>\n<p>&#x1f9e9; \u65b9\u6cd5\u5b9a\u4e49&#xff1a;public static &lt;V&gt; V getByPathAs(Map&lt;String, ?&gt; root, String path, Class&lt;V&gt; type, V defaultValue)<\/p>\n<p>&#x1f5e3;\ufe0f \u5165\u53c2\u89e3\u91ca&#xff1a;public static &lt;V&gt; V getByPathAs(\u6839Map, \u70b9\u5206\u8def\u5f84, \u671f\u671b\u7c7b\u578b, \u9ed8\u8ba4\u503c)<\/p>\n<p>&#x1f4e4; \u8fd4\u56de\u503c\u89e3\u91ca&#xff1a;V&#xff0c;\u547d\u4e2d\u4e14\u7c7b\u578b\u5339\u914d\u7ed9\u8be5\u503c&#xff0c;\u5426\u5219\u7ed9\u9ed8\u8ba4\u503c<\/p>\n<p>&#x1f4a1; \u8fb9\u754c\u53e3\u5f84&#xff1a;<\/p>\n<ul>\n<li>\u5224\u5b9a\u8d70 Class#isInstance&#xff0c;\u53d6\u5230\u7684\u503c\u662f null \u4e0d\u7b97\u547d\u4e2d&#xff0c;\u76f4\u63a5\u7ed9\u9ed8\u8ba4\u503c<\/li>\n<li>\u671f\u671b Number \u65f6 Integer\u3001Long\u3001Double \u90fd\u7b97\u547d\u4e2d<\/li>\n<li>type \u4f20 null \u629b NullPointerException&#xff0c;\u8fd9\u6761\u4e0e\u8def\u5f84\u7684 IllegalArgumentException \u662f\u4e24\u5957\u53e3\u5f84<\/li>\n<li>\u8def\u5f84\u4e3a\u7a7a\u6216\u7a7a\u767d\u540c\u6837\u629b IllegalArgumentException<\/li>\n<\/ul>\n<p>&#x1f9ea; \u65b9\u6cd5\u793a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>getByPathAs(response, &#034;data.orderNo&#034;, String.class, &#034;(\u975e\u5b57\u7b26\u4e32)&#034;) \u62ff\u5230 SO20261005001<\/li>\n<li>getByPathAs(response, &#034;data.orderNo&#034;, Long.class, -1L) \u62ff\u5230 -1&#xff0c;\u540c\u4e00\u4e2a\u952e\u6362\u4e2a\u671f\u671b\u7c7b\u578b\u5c31\u515c\u5e95<\/li>\n<li>getByPathAs(outer, &#034;code&#034;, Number.class, 0) \u62ff\u5230 0&#xff0c;Integer \u7b97 Number<\/li>\n<li>getByPathAs(response, &#034;data.orderNo&#034;, null, &#034;x&#034;) \u629b NullPointerException<\/li>\n<\/ul>\n<hr \/>\n<p>&#x1f522; \u65b9\u6cd5\u5e8f\u53f7&#xff1a;5<\/p>\n<p>&#x1f3af; \u65b9\u6cd5\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u628a\u53ef\u80fd\u4e3a null \u7684 Map \u53d8\u6210\u80fd\u76f4\u63a5\u904d\u5386\u3001\u80fd\u76f4\u63a5\u53d6 size \u7684 Map&#xff0c;\u7701\u6389\u6bcf\u4e2a\u8c03\u7528\u70b9\u7684\u5224\u7a7a<\/li>\n<li>\u4e0a\u6e38\u5b57\u6bb5\u7ecf\u5e38\u6574\u5757\u7f3a\u5931\u7684\u54cd\u5e94\u4f53&#xff0c;\u5148\u8fc7\u4e00\u9053\u518d\u5f80\u4e0b\u8d70<\/li>\n<\/ul>\n<p>&#x1f9e9; \u65b9\u6cd5\u5b9a\u4e49&#xff1a;public static &lt;K, V&gt; Map&lt;K, V&gt; nullSafe(Map&lt;K, V&gt; map)<\/p>\n<p>&#x1f5e3;\ufe0f \u5165\u53c2\u89e3\u91ca&#xff1a;public static &lt;K, V&gt; Map&lt;K, V&gt; nullSafe(\u53ef\u7a7aMap)<\/p>\n<p>&#x1f4e4; \u8fd4\u56de\u503c\u89e3\u91ca&#xff1a;Map&lt;K, V&gt;&#xff0c;\u5165\u53c2\u4e3a null \u7ed9\u4e0d\u53ef\u53d8\u7a7a Map&#xff0c;\u975e null \u539f\u5bf9\u8c61\u8fd4\u56de<\/p>\n<p>&#x1f4a1; \u8fb9\u754c\u53e3\u5f84&#xff1a;<\/p>\n<ul>\n<li>\u515c\u5e95\u7528\u7684\u662f Collections.emptyMap()&#xff0c;\u5f80\u5b83\u5199\u5165\u629b UnsupportedOperationException&#xff0c;\u8981\u5199\u5c31\u81ea\u5df1 new HashMap&lt;&gt;(&#8230;)<\/li>\n<li>\u975e null \u65f6\u4e0d\u590d\u5236&#xff0c;\u8fd4\u56de\u7684\u5c31\u662f\u540c\u4e00\u4e2a\u5bf9\u8c61&#xff0c;\u6539\u5b83\u7b49\u4e8e\u6539\u6e90<\/li>\n<li>\u53ea\u515c Map \u672c\u8eab&#xff0c;\u91cc\u9762\u7684\u503c\u4ecd\u53ef\u80fd\u662f null<\/li>\n<\/ul>\n<p>&#x1f9ea; \u65b9\u6cd5\u793a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>nullSafe(null) \u62ff\u5230 size&#061;0 \u7684\u7a7a Map<\/li>\n<li>\u5f80 nullSafe(null) \u7684\u7ed3\u679c\u91cc put \u629b UnsupportedOperationException<\/li>\n<li>nullSafe(data) &#061;&#061; data \u62ff\u5230 true&#xff0c;\u975e null \u65f6\u4e0d\u590d\u5236<\/li>\n<\/ul>\n<hr \/>\n<p>&#x1f522; \u65b9\u6cd5\u5e8f\u53f7&#xff1a;6<\/p>\n<p>&#x1f3af; \u65b9\u6cd5\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u88c5\u4e00\u5bf9\u952e\u503c\u6210 Map&#xff0c;null \u952e\u4e0e null \u503c\u90fd\u6536&#xff0c;\u8fd4\u56de\u7684\u662f\u53ef\u53d8 LinkedHashMap<\/li>\n<li>\u7ed9\u4e0b\u6e38\u4f20\u53c2\u3001\u9020\u5c0f\u7ed3\u6784\u65f6\u66ff\u4ee3 Collections.singletonMap&#xff0c;\u540e\u8005\u4e0d\u5141\u8bb8\u6539<\/li>\n<\/ul>\n<p>&#x1f9e9; \u65b9\u6cd5\u5b9a\u4e49&#xff1a;public static &lt;K, V&gt; Map&lt;K, V&gt; of(K k1, V v1)<\/p>\n<p>&#x1f5e3;\ufe0f \u5165\u53c2\u89e3\u91ca&#xff1a;public static &lt;K, V&gt; Map&lt;K, V&gt; of(\u952e, \u503c)<\/p>\n<p>&#x1f4e4; \u8fd4\u56de\u503c\u89e3\u91ca&#xff1a;Map&lt;K, V&gt;&#xff0c;\u542b\u8fd9\u4e00\u5bf9\u952e\u503c\u7684\u53ef\u53d8 Map<\/p>\n<p>&#x1f4a1; \u8fb9\u754c\u53e3\u5f84&#xff1a;<\/p>\n<ul>\n<li>Map.of \u9047\u5230 null \u952e\u6216 null \u503c\u76f4\u63a5\u629b\u5f02\u5e38&#xff0c;\u8fd9\u91cc\u7167\u6837\u6536\u8fdb Map<\/li>\n<li>Map.of \u8fd4\u56de\u4e0d\u53ef\u53d8\u4e14\u4e0d\u4fdd\u8bc1\u987a\u5e8f&#xff0c;\u672c\u65b9\u6cd5\u8fd4\u56de\u53ef\u53d8\u4e14\u6309\u63d2\u5165\u987a\u5e8f\u8fed\u4ee3<\/li>\n<li>\u6bcf\u6b21\u8c03\u7528\u65b0\u5efa\u4e00\u4e2a Map&#xff0c;\u4e0d\u5171\u4eab\u7ed3\u6784<\/li>\n<\/ul>\n<p>&#x1f9ea; \u65b9\u6cd5\u793a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>\u5f80 of(&#034;channel&#034;, &#034;ALIPAY&#034;) \u7684\u7ed3\u679c\u518d\u653e\u4e00\u9879\u62ff\u5230 {channel&#061;ALIPAY, extra&#061;null}&#xff0c;\u503c\u4e3a null \u4e5f\u653e\u5f97\u8fdb\u53bb<\/li>\n<li>of(null, null) \u62ff\u5230 {null&#061;null}&#xff0c;size \u4e3a 1<\/li>\n<\/ul>\n<hr \/>\n<p>&#x1f522; \u65b9\u6cd5\u5e8f\u53f7&#xff1a;7<\/p>\n<p>&#x1f3af; \u65b9\u6cd5\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u4e00\u6b21\u653e\u4e24\u5bf9\u952e\u503c&#xff0c;\u4ecd\u662f\u53ef\u53d8\u7684\u63d2\u5165\u987a\u5e8f Map<\/li>\n<li>\u9020\u4e24\u6761\u4ee5\u4e0a\u7684\u5c0f\u6570\u636e\u3001\u7ed9\u65ad\u8a00\u51c6\u5907\u671f\u671b Map \u65f6\u7528&#xff0c;\u6bd4 new \u518d put \u77ed<\/li>\n<\/ul>\n<p>&#x1f9e9; \u65b9\u6cd5\u5b9a\u4e49&#xff1a;public static &lt;K, V&gt; Map&lt;K, V&gt; of(K k1, V v1, K k2, V v2)<\/p>\n<p>&#x1f5e3;\ufe0f \u5165\u53c2\u89e3\u91ca&#xff1a;public static &lt;K, V&gt; Map&lt;K, V&gt; of(\u952e1, \u503c1, \u952e2, \u503c2)<\/p>\n<p>&#x1f4e4; \u8fd4\u56de\u503c\u89e3\u91ca&#xff1a;Map&lt;K, V&gt;&#xff0c;\u542b\u4e24\u5bf9\u952e\u503c\u7684\u53ef\u53d8 Map<\/p>\n<p>&#x1f4a1; \u8fb9\u754c\u53e3\u5f84&#xff1a;<\/p>\n<ul>\n<li>\u8fed\u4ee3\u987a\u5e8f\u5c31\u662f\u5199\u5165\u987a\u5e8f&#xff0c;\u8fd9\u4e00\u70b9\u548c Map.of \u7684\u65e0\u5e8f\u4e0d\u540c<\/li>\n<li>\u4e24\u5bf9\u952e\u76f8\u540c&#xff08;equals \u76f8\u7b49&#xff09;\u65f6\u540e\u5199\u7684\u8986\u76d6\u5148\u5199\u7684&#xff0c;\u53ea\u5269\u4e00\u6761<\/li>\n<li>\u9700\u8981\u4e09\u5bf9\u4ee5\u4e0a\u5148\u62ff\u4e24\u5bf9\u7248\u518d put&#xff0c;\u6216\u76f4\u63a5\u7528 merge<\/li>\n<\/ul>\n<p>&#x1f9ea; \u65b9\u6cd5\u793a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>of(&#034;b&#034;, 2, &#034;a&#034;, 1).keySet() \u62ff\u5230 [b, a]&#xff0c;JDK \u7684 Map.of \u7ed9\u4e0d\u4e86\u8fd9\u4e2a\u7a33\u5b9a\u987a\u5e8f<\/li>\n<\/ul>\n<hr \/>\n<p>&#x1f522; \u65b9\u6cd5\u5e8f\u53f7&#xff1a;8<\/p>\n<p>&#x1f3af; \u65b9\u6cd5\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u628a key \u4e0e value \u5bf9\u8c03&#xff0c;\u6bd4\u5982\u300c\u7801\u5230\u540d\u300d\u7684\u5b57\u5178\u7ffb\u6210\u300c\u540d\u5230\u7801\u300d\u518d\u6309\u540d\u5b57\u53cd\u67e5<\/li>\n<li>\u7ed3\u679c\u662f\u65b0 Map&#xff0c;\u6e90 Map \u4fdd\u6301\u4e0d\u52a8<\/li>\n<\/ul>\n<p>&#x1f9e9; \u65b9\u6cd5\u5b9a\u4e49&#xff1a;public static &lt;K, V&gt; Map&lt;V, K&gt; invert(Map&lt;K, V&gt; source)<\/p>\n<p>&#x1f5e3;\ufe0f \u5165\u53c2\u89e3\u91ca&#xff1a;public static &lt;K, V&gt; Map&lt;V, K&gt; invert(\u6e90Map)<\/p>\n<p>&#x1f4e4; \u8fd4\u56de\u503c\u89e3\u91ca&#xff1a;Map&lt;V, K&gt;&#xff0c;\u952e\u503c\u4e92\u6362\u540e\u7684\u53ef\u53d8 LinkedHashMap<\/p>\n<p>&#x1f4a1; \u8fb9\u754c\u53e3\u5f84&#xff1a;<\/p>\n<ul>\n<li>\u539f value \u6709\u91cd\u590d\u65f6\u540e\u51fa\u73b0\u7684 key \u8986\u76d6\u5148\u51fa\u73b0\u7684&#xff0c;\u53ea\u7559\u4e00\u6761\u6620\u5c04<\/li>\n<li>\u8981\u4fdd\u7559\u5168\u90e8\u6620\u5c04&#xff08;\u4e00\u4e2a\u503c\u5bf9\u591a\u4e2a\u952e&#xff09;\u8bf7\u6539\u7528 ListToMapUtils \u7684 groupValueBy<\/li>\n<li>value \u4e3a null \u65f6\u5b83\u4f1a\u88ab\u5f53\u6210\u952e\u653e\u8fdb\u7ed3\u679c\u91cc<\/li>\n<li>\u539f value \u5fc5\u987b\u80fd\u5f53 Map \u952e&#xff0c;\u6570\u7ec4\u3001\u672a\u91cd\u5199 equals \u7684\u5bf9\u8c61\u7ffb\u8fc7\u53bb\u4e5f\u67e5\u4e0d\u5230<\/li>\n<li>source \u4f20 null \u629b IllegalArgumentException<\/li>\n<\/ul>\n<p>&#x1f9ea; \u65b9\u6cd5\u793a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>invert(codeToName) \u62ff\u5230 {\u5f85\u652f\u4ed8&#061;10, \u5df2\u652f\u4ed8&#061;20}&#xff0c;\u6309\u540d\u5b57\u627e\u7801\u5c31\u9760\u5b83<\/li>\n<li>invert(dup) \u62ff\u5230 {A\u7ec4&#061;\u674e\u56db}&#xff0c;\u5f20\u4e09\u674e\u56db\u540c\u7ec4\u65f6\u540e\u8005\u8986\u76d6<\/li>\n<li>invert(nullValueMap) \u62ff\u5230 {91&#061;\u7532, null&#061;\u4e59}<\/li>\n<li>invert(null) \u629b IllegalArgumentException<\/li>\n<\/ul>\n<hr \/>\n<p>&#x1f522; \u65b9\u6cd5\u5e8f\u53f7&#xff1a;9<\/p>\n<p>&#x1f3af; \u65b9\u6cd5\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u6309\u503c\u7b5b Map&#xff0c;\u8c13\u8bcd\u4e3a true \u7684\u6761\u76ee\u7559\u4e0b&#xff0c;\u987a\u5e8f\u6309\u539f Map<\/li>\n<li>\u53ea\u7559\u53ca\u683c\u5206\u3001\u53ea\u7559\u67d0\u4e2a\u72b6\u6001\u8fd9\u7c7b\u6309\u503c\u88c1\u526a\u65f6\u7528<\/li>\n<\/ul>\n<p>&#x1f9e9; \u65b9\u6cd5\u5b9a\u4e49&#xff1a;public static &lt;K, V&gt; Map&lt;K, V&gt; filterByValue(Map&lt;K, V&gt; source, Predicate&lt;? super V&gt; predicate)<\/p>\n<p>&#x1f5e3;\ufe0f \u5165\u53c2\u89e3\u91ca&#xff1a;public static &lt;K, V&gt; Map&lt;K, V&gt; filterByValue(\u6e90Map, \u503c\u8c13\u8bcd)<\/p>\n<p>&#x1f4e4; \u8fd4\u56de\u503c\u89e3\u91ca&#xff1a;Map&lt;K, V&gt;&#xff0c;\u8fc7\u6ee4\u540e\u7684\u53ef\u53d8 LinkedHashMap&#xff0c;\u4fdd\u6301\u539f\u987a\u5e8f<\/p>\n<p>&#x1f4a1; \u8fb9\u754c\u53e3\u5f84&#xff1a;<\/p>\n<ul>\n<li>\u8c13\u8bcd\u4f1a\u6536\u5230 null \u503c&#xff0c;\u5224\u7a7a\u5f97\u5199\u5728\u8c13\u8bcd\u91cc&#xff0c;\u672c\u7c7b\u4e0d\u66ff\u8c03\u7528\u65b9\u6321<\/li>\n<li>\u4e0d\u56de\u5199\u5165\u53c2&#xff0c;\u8fd4\u56de\u65b0\u5efa\u7684 Map&#xff0c;\u6761\u76ee\u91cc\u7684\u503c\u4ecd\u662f\u540c\u4e00\u4e2a\u5f15\u7528<\/li>\n<li>source \u6216 predicate \u4e3a null \u629b IllegalArgumentException<\/li>\n<\/ul>\n<p>&#x1f9ea; \u65b9\u6cd5\u793a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>filterByValue(scores, score -&gt; score &gt;&#061; 80) \u62ff\u5230 {\u5f20\u4e09&#061;91}<\/li>\n<li>filterByValue(withNullValue, v -&gt; v !&#061; null &amp;&amp; v &gt; 80) \u62ff\u5230 {\u7532&#061;91}&#xff0c;\u503c\u4e3a null \u7684\u9879\u7531\u8c13\u8bcd\u81ea\u5df1\u6321\u6389<\/li>\n<li>filterByValue(scores, null) \u629b IllegalArgumentException<\/li>\n<\/ul>\n<hr \/>\n<p>&#x1f522; \u65b9\u6cd5\u5e8f\u53f7&#xff1a;10<\/p>\n<p>&#x1f3af; \u65b9\u6cd5\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u6309\u952e\u7b5b Map&#xff0c;\u952e\u6ee1\u8db3\u8c13\u8bcd\u624d\u7559&#xff0c;\u503c\u4e0d\u770b<\/li>\n<li>\u6309\u524d\u7f00\u6311\u914d\u7f6e\u9879\u3001\u53ea\u7559\u67d0\u4e2a\u4eba\u7684\u5b57\u6bb5\u8fd9\u7c7b\u64cd\u4f5c\u7528\u8fd9\u4e00\u7248<\/li>\n<\/ul>\n<p>&#x1f9e9; \u65b9\u6cd5\u5b9a\u4e49&#xff1a;public static &lt;K, V&gt; Map&lt;K, V&gt; filterByKey(Map&lt;K, V&gt; source, Predicate&lt;? super K&gt; predicate)<\/p>\n<p>&#x1f5e3;\ufe0f \u5165\u53c2\u89e3\u91ca&#xff1a;public static &lt;K, V&gt; Map&lt;K, V&gt; filterByKey(\u6e90Map, \u952e\u8c13\u8bcd)<\/p>\n<p>&#x1f4e4; \u8fd4\u56de\u503c\u89e3\u91ca&#xff1a;Map&lt;K, V&gt;&#xff0c;\u8fc7\u6ee4\u540e\u7684\u53ef\u53d8 LinkedHashMap&#xff0c;\u4fdd\u6301\u539f\u987a\u5e8f<\/p>\n<p>&#x1f4a1; \u8fb9\u754c\u53e3\u5f84&#xff1a;<\/p>\n<ul>\n<li>\u5b9e\u73b0\u662f\u5148\u6574\u4f53\u62f7\u8d1d\u518d\u6309\u952e removeIf&#xff0c;\u8fd4\u56de\u65b0 Map&#xff0c;\u6e90\u4e0d\u52a8<\/li>\n<li>\u503c\u4e3a null \u7684\u6761\u76ee\u53ea\u8981\u952e\u6ee1\u8db3\u6761\u4ef6\u5c31\u7167\u6837\u7559\u4e0b<\/li>\n<li>source \u6216 predicate \u4e3a null \u629b IllegalArgumentException<\/li>\n<\/ul>\n<p>&#x1f9ea; \u65b9\u6cd5\u793a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>filterByKey(scores, name -&gt; name.contains(&#034;\u5f20&#034;)) \u62ff\u5230 {\u5f20\u4e09&#061;91}<\/li>\n<\/ul>\n<hr \/>\n<p>&#x1f522; \u65b9\u6cd5\u5e8f\u53f7&#xff1a;11<\/p>\n<p>&#x1f3af; \u65b9\u6cd5\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u952e\u4fdd\u6301\u4e0d\u52a8&#xff0c;\u628a\u6bcf\u4e2a\u503c\u6362\u6210\u53e6\u4e00\u79cd\u7c7b\u578b\u6216\u53e6\u4e00\u79cd\u8868\u8fbe&#xff0c;\u6bd4\u5982\u5206\u6570\u6362\u6210\u8bc4\u8bed\u3001\u7801\u503c\u6362\u6210\u4e2d\u6587\u540d<\/li>\n<li>\u7ed3\u679c\u7ed9\u524d\u7aef\u5c55\u793a\u3001\u65e5\u5fd7\u8f93\u51fa\u8fd9\u7c7b\u9700\u8981\u300c\u6362\u4e2a\u8bf4\u6cd5\u300d\u7684\u573a\u5408<\/li>\n<\/ul>\n<p>&#x1f9e9; \u65b9\u6cd5\u5b9a\u4e49&#xff1a;public static &lt;K, V, R&gt; Map&lt;K, R&gt; mapValue(Map&lt;K, V&gt; source, Function&lt;V, R&gt; mapper)<\/p>\n<p>&#x1f5e3;\ufe0f \u5165\u53c2\u89e3\u91ca&#xff1a;public static &lt;K, V, R&gt; Map&lt;K, R&gt; mapValue(\u6e90Map, \u503c\u6620\u5c04\u51fd\u6570)<\/p>\n<p>&#x1f4e4; \u8fd4\u56de\u503c\u89e3\u91ca&#xff1a;Map&lt;K, R&gt;&#xff0c;\u952e\u4e0d\u53d8\u3001\u503c\u6362\u6210\u6620\u5c04\u7ed3\u679c\u7684\u65b0 Map<\/p>\n<p>&#x1f4a1; \u8fb9\u754c\u53e3\u5f84&#xff1a;<\/p>\n<ul>\n<li>\u6620\u5c04\u51fd\u6570\u4f1a\u6536\u5230 null \u503c&#xff0c;\u4e0d\u5224\u7a7a\u5c31\u5728\u51fd\u6570\u91cc\u63a5\u4f4f<\/li>\n<li>\u8fd4\u56de\u65b0 Map&#xff0c;\u952e\u4e0e\u6620\u5c04\u7ed3\u679c\u662f\u65b0\u5efa\u7684&#xff0c;\u6e90 Map \u4e0d\u53d7\u5f71\u54cd<\/li>\n<li>source \u6216 mapper \u4e3a null \u629b IllegalArgumentException<\/li>\n<\/ul>\n<p>&#x1f9ea; \u65b9\u6cd5\u793a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>mapValue(scores, score -&gt; score &gt;&#061; 60 ? &#034;\u53ca\u683c&#034; : &#034;\u4e0d\u53ca\u683c&#034;) \u62ff\u5230 {\u5f20\u4e09&#061;\u53ca\u683c, \u674e\u56db&#061;\u4e0d\u53ca\u683c, \u738b\u4e94&#061;\u53ca\u683c}<\/li>\n<li>mapValue(nullValueMap, v -&gt; v &#061;&#061; null ? &#034;\u65e0\u6210\u7ee9&#034; : v &#043; &#034;\u5206&#034;) \u62ff\u5230 {\u7532&#061;91\u5206, \u4e59&#061;\u65e0\u6210\u7ee9}<\/li>\n<\/ul>\n<hr \/>\n<p>&#x1f522; \u65b9\u6cd5\u5e8f\u53f7&#xff1a;12<\/p>\n<p>&#x1f3af; \u65b9\u6cd5\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u4e00\u6b65\u5224\u300c\u662f null \u6216\u8005\u6ca1\u6709\u6761\u76ee\u300d&#xff0c;\u5199\u524d\u7f6e\u6821\u9a8c\u65f6\u4e0d\u7528\u5148\u5224\u7a7a\u5f15\u7528\u518d\u5224 size<\/li>\n<li>\u53c2\u6570\u91cc\u4f20 Map \u7684\u65b9\u6cd5\u8fdb\u95e8\u5148\u95ee\u4e00\u53e5&#xff0c;\u540e\u9762\u5c31\u80fd\u653e\u5fc3\u904d\u5386<\/li>\n<\/ul>\n<p>&#x1f9e9; \u65b9\u6cd5\u5b9a\u4e49&#xff1a;public static boolean isEmpty(Map&lt;?, ?&gt; map)<\/p>\n<p>&#x1f5e3;\ufe0f \u5165\u53c2\u89e3\u91ca&#xff1a;public static boolean isEmpty(\u5f85\u5224\u65adMap)<\/p>\n<p>&#x1f4e4; \u8fd4\u56de\u503c\u89e3\u91ca&#xff1a;boolean&#xff0c;\u4e3a null \u6216\u6ca1\u6709\u4efb\u4f55\u6761\u76ee\u8fd4\u56de true<\/p>\n<p>&#x1f4a1; \u8fb9\u754c\u53e3\u5f84&#xff1a;<\/p>\n<ul>\n<li>\u53ea\u770b\u6761\u76ee\u6570&#xff0c;\u4e0d\u770b\u5185\u5bb9&#xff1a;\u88c5\u7740 null \u952e\u3001null \u503c\u7684 Map \u4e0d\u7b97\u7a7a<\/li>\n<li>\u6ca1\u6709\u63d0\u4f9b\u53cd\u5411\u7684 isNotEmpty&#xff0c;\u9700\u8981\u5c31\u81ea\u5df1\u53d6\u53cd<\/li>\n<\/ul>\n<p>&#x1f9ea; \u65b9\u6cd5\u793a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>isEmpty(null) \u62ff\u5230 true<\/li>\n<li>isEmpty(Map.of()) \u62ff\u5230 true<\/li>\n<li>isEmpty(response) \u62ff\u5230 false<\/li>\n<li>isEmpty(of(null, null)) \u62ff\u5230 false&#xff0c;\u88c5\u7740 null \u952e\u4e5f\u7b97\u6709\u5185\u5bb9<\/li>\n<\/ul>\n<hr \/>\n<p>&#x1f522; \u65b9\u6cd5\u5e8f\u53f7&#xff1a;13<\/p>\n<p>&#x1f3af; \u65b9\u6cd5\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u591a\u4e2a\u914d\u7f6e Map \u53e0\u6210\u4e00\u5c42&#xff0c;\u540e\u8005\u8986\u76d6\u524d\u8005\u7684\u540c\u952e&#xff0c;\u6bd4\u5982\u9ed8\u8ba4\u914d\u7f6e\u52a0\u73af\u5883\u8986\u76d6\u52a0\u8bf7\u6c42\u8986\u76d6<\/li>\n<li>\u53c2\u6570\u6570\u7ec4\u91cc\u6df7\u7740 null Map \u65f6\u4e0d\u7528\u5148\u8fc7\u6ee4&#xff0c;\u672c\u65b9\u6cd5\u81ea\u5df1\u8df3\u8fc7<\/li>\n<\/ul>\n<p>&#x1f9e9; \u65b9\u6cd5\u5b9a\u4e49&#xff1a;public static &lt;K, V&gt; Map&lt;K, V&gt; merge(Map&lt;? extends K, ? extends V&gt;&#8230; maps)<\/p>\n<p>&#x1f5e3;\ufe0f \u5165\u53c2\u89e3\u91ca&#xff1a;public static &lt;K, V&gt; Map&lt;K, V&gt; merge(\u82e5\u5e72Map\u6309\u8986\u76d6\u987a\u5e8f)<\/p>\n<p>&#x1f4e4; \u8fd4\u56de\u503c\u89e3\u91ca&#xff1a;Map&lt;K, V&gt;&#xff0c;\u5408\u5e76\u540e\u7684\u53ef\u53d8 LinkedHashMap<\/p>\n<p>&#x1f4a1; \u8fb9\u754c\u53e3\u5f84&#xff1a;<\/p>\n<ul>\n<li>\u952e\u7684\u987a\u5e8f\u6309\u9996\u6b21\u51fa\u73b0\u7684\u4f4d\u7f6e\u6392&#xff0c;\u540e\u9762\u8986\u76d6\u540c\u952e\u4e0d\u6539\u5b83\u7684\u4f4d\u7f6e<\/li>\n<li>\u81f3\u5c11\u4f20\u4e00\u4e2a Map&#xff0c;merge() \u7a7a\u53c2\u629b IllegalArgumentException&#xff1b;\u6570\u7ec4\u672c\u8eab\u4e3a null \u540c\u6837\u62a5\u9519<\/li>\n<li>\u7ed3\u679c\u662f\u65b0\u5efa\u7684 Map&#xff0c;\u6761\u76ee\u91cc\u7684\u503c\u4ecd\u662f\u540c\u4e00\u4e2a\u5f15\u7528<\/li>\n<\/ul>\n<p>&#x1f9ea; \u65b9\u6cd5\u793a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>merge(base, null, override) \u62ff\u5230 {timeout&#061;3000, retry&#061;3, signType&#061;RSA}&#xff0c;retry \u88ab\u540e\u8005\u6539\u6210 3<\/li>\n<li>merge(Map.of(&#034;timeout&#034;, 1000), null, Map.of(&#034;timeout&#034;, 3000, &#034;retry&#034;, 3)) \u62ff\u5230 {timeout&#061;3000, retry&#061;3}<\/li>\n<li>merge(outer) \u53ea\u7ed9\u4e00\u4e2a Map \u65f6\u62ff\u5230\u5b83\u7684\u4e00\u4efd\u62f7\u8d1d {code&#061;0, data&#061;{score&#061;98, rate&#061;3.5, code&#061;0}}<\/li>\n<li>merge() \u629b IllegalArgumentException<\/li>\n<\/ul>\n<hr \/>\n<p>&#x1f522; \u65b9\u6cd5\u5e8f\u53f7&#xff1a;14<\/p>\n<p>&#x1f3af; \u65b9\u6cd5\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u4ece Map \u91cc\u53d6 int&#xff0c;\u952e\u7f3a\u5931\u3001\u503c\u4e3a null\u3001\u503c\u4e0d\u662f Number \u4e09\u79cd\u60c5\u51b5\u4e00\u5f8b\u7ed9\u9ed8\u8ba4\u503c<\/li>\n<li>\u5916\u90e8\u62a5\u6587\u91cc\u7684\u6570\u5b57\u5b57\u6bb5\u7c7b\u578b\u4e0d\u7a33\u65f6\u7528&#xff0c;\u6bd4\u5f3a\u8f6c Integer \u5b89\u5168<\/li>\n<\/ul>\n<p>&#x1f9e9; \u65b9\u6cd5\u5b9a\u4e49&#xff1a;public static int getInt(Map&lt;String, ?&gt; map, String key, int defaultValue)<\/p>\n<p>&#x1f5e3;\ufe0f \u5165\u53c2\u89e3\u91ca&#xff1a;public static int getInt(\u6e90Map, \u952e, \u9ed8\u8ba4\u503c)<\/p>\n<p>&#x1f4e4; \u8fd4\u56de\u503c\u89e3\u91ca&#xff1a;int&#xff0c;\u503c\u662f Number \u65f6\u53d6 intValue()&#xff0c;\u5426\u5219\u7ed9\u9ed8\u8ba4\u503c<\/p>\n<p>&#x1f4a1; \u8fb9\u754c\u53e3\u5f84&#xff1a;<\/p>\n<ul>\n<li>\u53ea\u8ba4 Number&#xff0c;\u5b57\u7b26\u4e32 \u201c98\u201d \u4e0d\u5f53\u6570\u5b57\u89e3\u6790&#xff0c;\u4e0d\u505a Integer.parseInt \u90a3\u5957<\/li>\n<li>Double \u8d70 intValue() \u4f1a\u622a\u6389\u5c0f\u6570<\/li>\n<li>Long \u8d85\u51fa int \u8303\u56f4\u65f6\u6309 intValue() \u622a\u4f4e\u4f4d&#xff0c;\u4e0d\u4f1a\u629b\u5f02\u5e38&#xff0c;\u53d6\u503c\u524d\u5148\u786e\u8ba4\u91cf\u7ea7<\/li>\n<li>map \u4f20 null \u7ed9\u9ed8\u8ba4\u503c<\/li>\n<\/ul>\n<p>&#x1f9ea; \u65b9\u6cd5\u793a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>getInt(response, &#034;code&#034;, -1) \u62ff\u5230 0&#xff0c;\u503c\u771f\u662f 0 \u65f6\u4e0e\u9ed8\u8ba4\u503c -1 \u5206\u5f97\u6e05<\/li>\n<li>getInt(data, &#034;score&#034;, -1) \u62ff\u5230 -1&#xff0c;\u503c\u662f\u5b57\u7b26\u4e32\u5c31\u4e0d\u89e3\u6790<\/li>\n<li>getInt(nums, &#034;rate&#034;, -1) \u62ff\u5230 3&#xff0c;Double 3.5 \u88ab\u622a\u6389\u5c0f\u6570<\/li>\n<li>getInt(nums, &#034;big&#034;, -1) \u62ff\u5230 410065408&#xff0c;9000000000 \u8d85\u51fa int \u540e\u622a\u4e86\u4f4e\u4f4d<\/li>\n<li>getInt(null, &#034;rate&#034;, -1) \u62ff\u5230 -1<\/li>\n<\/ul>\n<hr \/>\n<p>&#x1f522; \u65b9\u6cd5\u5e8f\u53f7&#xff1a;15<\/p>\n<p>&#x1f3af; \u65b9\u6cd5\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u4ece Map \u91cc\u53d6 long&#xff0c;\u91d1\u989d\u5206\u3001\u65f6\u95f4\u6233\u8fd9\u7c7b\u5b57\u6bb5\u7528\u8fd9\u4e00\u7248&#xff0c;\u53e3\u5f84\u4e0e getInt \u4e00\u81f4<\/li>\n<li>\u503c\u53ef\u80fd\u662f Integer \u4e5f\u53ef\u80fd\u662f Long \u7684\u63a5\u53e3\u5b57\u6bb5&#xff0c;\u53d6\u6210 long \u4e0d\u4e22\u4f4d<\/li>\n<\/ul>\n<p>&#x1f9e9; \u65b9\u6cd5\u5b9a\u4e49&#xff1a;public static long getLong(Map&lt;String, ?&gt; map, String key, long defaultValue)<\/p>\n<p>&#x1f5e3;\ufe0f \u5165\u53c2\u89e3\u91ca&#xff1a;public static long getLong(\u6e90Map, \u952e, \u9ed8\u8ba4\u503c)<\/p>\n<p>&#x1f4e4; \u8fd4\u56de\u503c\u89e3\u91ca&#xff1a;long&#xff0c;\u503c\u662f Number \u65f6\u53d6 longValue()&#xff0c;\u5426\u5219\u7ed9\u9ed8\u8ba4\u503c<\/p>\n<p>&#x1f4a1; \u8fb9\u754c\u53e3\u5f84&#xff1a;<\/p>\n<ul>\n<li>Integer \u5347\u5230 long \u65e0\u635f&#xff0c;Double \u4f1a\u622a\u6389\u5c0f\u6570<\/li>\n<li>\u5b57\u7b26\u4e32\u4e0d\u89e3\u6790&#xff0c;\u7f3a\u952e\u7ed9\u9ed8\u8ba4\u503c<\/li>\n<li>map \u4f20 null \u7ed9\u9ed8\u8ba4\u503c<\/li>\n<\/ul>\n<p>&#x1f9ea; \u65b9\u6cd5\u793a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>getLong(payInfo, &#034;amount&#034;, 0L) \u62ff\u5230 12850<\/li>\n<li>getLong(payInfo, &#034;discount&#034;, 0L) \u62ff\u5230 0&#xff0c;\u952e\u4e0d\u5b58\u5728\u65f6\u515c\u5e95<\/li>\n<li>getLong(nums, &#034;score&#034;, -1L) \u62ff\u5230 98&#xff0c;Integer \u5347 long \u65e0\u635f<\/li>\n<\/ul>\n<hr \/>\n<p>&#x1f522; \u65b9\u6cd5\u5e8f\u53f7&#xff1a;16<\/p>\n<p>&#x1f3af; \u65b9\u6cd5\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u4ece Map \u91cc\u53d6 double&#xff0c;\u8d39\u7387\u3001\u6bd4\u4f8b\u8fd9\u7c7b\u5b57\u6bb5\u7528&#xff0c;\u7f3a\u952e\u4e0e\u7c7b\u578b\u4e0d\u7b26\u4e00\u5f8b\u515c\u5e95<\/li>\n<li>\u503c\u6709\u65f6\u662f\u6574\u6570\u5199\u6cd5\u6709\u65f6\u662f\u5c0f\u6570\u65f6\u7528&#xff0c;Integer \u4e5f\u80fd\u76f4\u63a5\u53d6\u6210\u5c0f\u6570\u5f62\u6001<\/li>\n<\/ul>\n<p>&#x1f9e9; \u65b9\u6cd5\u5b9a\u4e49&#xff1a;public static double getDouble(Map&lt;String, ?&gt; map, String key, double defaultValue)<\/p>\n<p>&#x1f5e3;\ufe0f \u5165\u53c2\u89e3\u91ca&#xff1a;public static double getDouble(\u6e90Map, \u952e, \u9ed8\u8ba4\u503c)<\/p>\n<p>&#x1f4e4; \u8fd4\u56de\u503c\u89e3\u91ca&#xff1a;double&#xff0c;\u503c\u662f Number \u65f6\u53d6 doubleValue()&#xff0c;\u5426\u5219\u7ed9\u9ed8\u8ba4\u503c<\/p>\n<p>&#x1f4a1; \u8fb9\u754c\u53e3\u5f84&#xff1a;<\/p>\n<ul>\n<li>\u53ea\u8ba4 Number&#xff0c;\u5b57\u7b26\u4e32 \u201c3.5\u201d \u4e0d\u7b97<\/li>\n<li>Integer\u3001Long \u53d6\u51fa\u6765\u4f1a\u53d8\u6210 98.0 \u8fd9\u79cd\u5f62\u6001&#xff0c;\u8f93\u51fa\u524d\u6ce8\u610f\u683c\u5f0f<\/li>\n<li>\u91d1\u989d\u7cbe\u5ea6\u8981\u6c42\u9ad8\u65f6\u522b\u7528 double&#xff0c;\u53d6 long \u5206\u503c\u81ea\u5df1\u7b97<\/li>\n<\/ul>\n<p>&#x1f9ea; \u65b9\u6cd5\u793a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>getDouble(data, &#034;rate&#034;, 1.0d) \u62ff\u5230 3.5<\/li>\n<li>getDouble(nums, &#034;score&#034;, -1D) \u62ff\u5230 98.0&#xff0c;\u6574\u6570\u503c\u88ab\u8f6c\u6210\u5c0f\u6570\u5f62\u6001<\/li>\n<\/ul>\n<hr \/>\n<p>&#x1f522; \u65b9\u6cd5\u5e8f\u53f7&#xff1a;17<\/p>\n<p>&#x1f3af; \u65b9\u6cd5\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u4ece Map \u91cc\u53d6 boolean&#xff0c;\u503c\u5fc5\u987b\u662f Boolean \u5b9e\u4f8b&#xff0c;\u5176\u4f59\u4e00\u5f8b\u7ed9\u9ed8\u8ba4\u503c<\/li>\n<li>\u5f00\u5173\u4f4d\u3001\u662f\u5426\u5df2\u652f\u4ed8\u8fd9\u7c7b\u5b57\u6bb5&#xff0c;\u7528\u9ed8\u8ba4\u503c\u8868\u8fbe\u300c\u6ca1\u7ed9\u5c31\u6309\u67d0\u79cd\u9ed8\u8ba4\u5904\u7406\u300d<\/li>\n<\/ul>\n<p>&#x1f9e9; \u65b9\u6cd5\u5b9a\u4e49&#xff1a;public static boolean getBoolean(Map&lt;String, ?&gt; map, String key, boolean defaultValue)<\/p>\n<p>&#x1f5e3;\ufe0f \u5165\u53c2\u89e3\u91ca&#xff1a;public static boolean getBoolean(\u6e90Map, \u952e, \u9ed8\u8ba4\u503c)<\/p>\n<p>&#x1f4e4; \u8fd4\u56de\u503c\u89e3\u91ca&#xff1a;boolean&#xff0c;\u503c\u662f Boolean \u65f6\u53d6\u8be5\u503c&#xff0c;\u5426\u5219\u7ed9\u9ed8\u8ba4\u503c<\/p>\n<p>&#x1f4a1; \u8fb9\u754c\u53e3\u5f84&#xff1a;<\/p>\n<ul>\n<li>\u5b57\u7b26\u4e32 \u201ctrue\u201d \u4e0d\u5f53 true \u5904\u7406&#xff0c;&#034;1&#034; \u4e5f\u4e0d\u5f53 true&#xff0c;\u7f3a\u952e\u4e0e null \u503c\u540c\u6837\u8d70\u9ed8\u8ba4<\/li>\n<li>Integer 0 \u4e0e 1 \u4e0d\u4f1a\u88ab\u89e3\u91ca\u6210 false \u4e0e true<\/li>\n<li>map \u4f20 null \u7ed9\u9ed8\u8ba4\u503c<\/li>\n<\/ul>\n<p>&#x1f9ea; \u65b9\u6cd5\u793a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>getBoolean(data, &#034;paid&#034;, false) \u62ff\u5230 true<\/li>\n<li>getBoolean(data, &#034;orderNo&#034;, false) \u62ff\u5230 false&#xff0c;\u503c\u662f\u5b57\u7b26\u4e32\u5c31\u5f53\u53d6\u4e0d\u5230<\/li>\n<\/ul>\n<hr \/>\n<p>&#x1f522; \u65b9\u6cd5\u5e8f\u53f7&#xff1a;18<\/p>\n<p>&#x1f3af; \u65b9\u6cd5\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u4ece Map \u91cc\u53d6\u4e00\u6bb5\u6587\u672c&#xff0c;\u7f3a\u5931\u4e0e null \u7ed9\u9ed8\u8ba4\u503c&#xff0c;\u975e String \u503c\u8d70 String.valueOf<\/li>\n<li>\u62fc\u65e5\u5fd7\u3001\u62fc\u63d0\u793a\u8bed\u65f6\u4e0d\u7ba1\u503c\u5b9e\u9645\u662f\u4ec0\u4e48\u7c7b\u578b\u90fd\u80fd\u62ff\u5230\u4e00\u4e2a\u5b57\u7b26\u4e32<\/li>\n<\/ul>\n<p>&#x1f9e9; \u65b9\u6cd5\u5b9a\u4e49&#xff1a;public static String getString(Map&lt;String, ?&gt; map, String key, String defaultValue)<\/p>\n<p>&#x1f5e3;\ufe0f \u5165\u53c2\u89e3\u91ca&#xff1a;public static String getString(\u6e90Map, \u952e, \u9ed8\u8ba4\u503c)<\/p>\n<p>&#x1f4e4; \u8fd4\u56de\u503c\u89e3\u91ca&#xff1a;String&#xff0c;\u503c\u975e null \u65f6\u7ed9\u5b83\u7684\u6587\u672c\u5f62\u6001&#xff0c;null \u6216\u7f3a\u5931\u7ed9\u9ed8\u8ba4\u503c<\/p>\n<p>&#x1f4a1; \u8fb9\u754c\u53e3\u5f84&#xff1a;<\/p>\n<ul>\n<li>\u6570\u5b57\u76f4\u63a5\u8f6c\u6587\u672c&#xff0c;Long 12850 \u62ff\u5230 \u201c12850\u201d<\/li>\n<li>\u6570\u7ec4\u3001\u6ca1\u91cd\u5199 toString \u7684\u5bf9\u8c61\u53ea\u4f1a\u5f97\u5230\u9ed8\u8ba4 toString&#xff0c;\u522b\u6307\u671b\u5b83\u505a\u683c\u5f0f\u5316<\/li>\n<li>map \u4f20 null \u7ed9\u9ed8\u8ba4\u503c&#xff0c;\u503c\u4e3a null \u4e5f\u7ed9\u9ed8\u8ba4\u503c<\/li>\n<\/ul>\n<p>&#x1f9ea; \u65b9\u6cd5\u793a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>getString(data, &#034;score&#034;, &#034;&#034;) \u62ff\u5230 &#034;98&#034;<\/li>\n<li>getString(payInfo, &#034;amount&#034;, &#034;&#034;) \u62ff\u5230 &#034;12850&#034;<\/li>\n<li>getString(data, &#034;absent&#034;, &#034;\u9ed8\u8ba4\u6587\u6848&#034;) \u62ff\u5230 \u9ed8\u8ba4\u6587\u6848<\/li>\n<li>getString(of(&#034;arr&#034;, new int[]{1, 2}), &#034;arr&#034;, &#034;&#034;) \u62ff\u5230 [I&#064;14d3bc22&#xff0c;\u6570\u7ec4\u53ea\u80fd\u5f97\u5230\u9ed8\u8ba4 toString<\/li>\n<\/ul>\n<hr \/>\n<p>&#x1f522; \u65b9\u6cd5\u5e8f\u53f7&#xff1a;19<\/p>\n<p>&#x1f3af; \u65b9\u6cd5\u7528\u9014&#xff1a;<\/p>\n<ul>\n<li>\u628a\u503c\u4e3a null \u7684\u6761\u76ee\u6e05\u6389&#xff0c;\u5269\u4e0b\u7684\u6309\u539f\u987a\u5e8f\u88c5\u8fdb\u65b0 Map<\/li>\n<li>\u63d0\u4ea4\u524d\u6e05\u6d17\u53ef\u9009\u5b57\u6bb5\u3001\u5e8f\u5217\u5316\u524d\u4e0d\u60f3\u5e26\u4e00\u5806 null \u65f6\u7528<\/li>\n<\/ul>\n<p>&#x1f9e9; \u65b9\u6cd5\u5b9a\u4e49&#xff1a;public static &lt;K, V&gt; Map&lt;K, V&gt; removeNullValues(Map&lt;K, V&gt; source)<\/p>\n<p>&#x1f5e3;\ufe0f \u5165\u53c2\u89e3\u91ca&#xff1a;public static &lt;K, V&gt; Map&lt;K, V&gt; removeNullValues(\u6e90Map)<\/p>\n<p>&#x1f4e4; \u8fd4\u56de\u503c\u89e3\u91ca&#xff1a;Map&lt;K, V&gt;&#xff0c;\u53bb\u6389 null \u503c\u6761\u76ee\u540e\u7684\u53ef\u53d8 LinkedHashMap<\/p>\n<p>&#x1f4a1; \u8fb9\u754c\u53e3\u5f84&#xff1a;<\/p>\n<ul>\n<li>\u53ea\u6e05\u503c\u4e3a null \u7684\u9879&#xff0c;\u7a7a\u5b57\u7b26\u4e32\u3001\u7a7a\u96c6\u5408\u539f\u6837\u4fdd\u7559<\/li>\n<li>null \u952e\u672c\u8eab\u4e0d\u4f1a\u88ab\u6e05&#xff0c;\u6e05\u7684\u53ea\u662f\u503c\u4e3a null \u7684\u6761\u76ee<\/li>\n<li>\u6e90 Map \u4e0d\u52a8&#xff0c;\u8fd4\u56de\u65b0\u5efa\u7684 Map&#xff0c;\u503c\u4ecd\u662f\u540c\u4e00\u4e2a\u5f15\u7528<\/li>\n<li>source \u4f20 null \u629b IllegalArgumentException<\/li>\n<\/ul>\n<p>&#x1f9ea; \u65b9\u6cd5\u793a\u4f8b&#xff1a;<\/p>\n<ul>\n<li>removeNullValues(mixed) \u62ff\u5230 \u5269 3 \u9879&#xff0c;\u503c\u4e3a null \u7684 channel \u88ab\u6458\u6389<\/li>\n<li>removeNullValues(blanks) \u62ff\u5230 {name&#061;, tags&#061;[]}&#xff0c;\u7a7a\u4e32\u4e0e\u7a7a\u96c6\u5408\u90fd\u7559\u7740<\/li>\n<li>removeNullValues(Map.of()) \u62ff\u5230 {}<\/li>\n<\/ul>\n<h3>\u56db\u3001\u5de5\u5177\u7c7b\u6e90\u7801&#xff08;\u53ef\u76f4\u63a5\u590d\u5236&#xff09; <\/h3>\n<p>&#x1f4e6; \u6e90\u7801\u6587\u4ef6<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#x1f4cc; \u9ad8\u5e76\u53d1\u7cfb\u7edf\u8bbe\u8ba1&#xff1a; \u57fa\u4e8eRedis\u4e0eMQ\u7684\u79d2\u6740\u7cfb\u7edf\u67b6\u6784&#xff1a;\u5e93\u5b58\u9884\u51cf\u3001\u9632\u8d85\u5356\u4e0e\u9650\u6d41\u9632\u5237\u5168\u6d41\u7a0b\u89e3\u6790 &#x1f4cb; \u76ee\u5f55<br \/>\n\u4e00\u3001\u5de5\u5177\u7c7b\u529f\u80fd\u4e8c\u3001\u6240\u9700\u73af\u5883\u4e09\u3001\u65b9\u6cd5\u4e0e\u8c03\u7528\u793a\u4f8b&#xff08;\u6309\u9700\u8c03\u7528&#xff09;\u56db\u3001\u5de5\u5177\u7c7b\u6e90\u7801&#xff08;\u53ef\u76f4\u63a5\u590d\u5236&#xff09;<br \/>\n\u4e00\u3001\u5de5\u5177\u7c7b\u529f\u80fd<br \/>\n\u8bfb\u5199 Map \u4e0d\u7528\u5148\u5224\u7a7a\u3001\u4e0d\u7528\u5c42\u5c42\u5f3a\u8f6c&#xff0c;\u53d6\u4e0d\u5230\u5c31\u6309\u9ed8\u8ba4\u503c\u515c\u5e95&#xff0c;\u53e6\u7ed9\u6784\u5efa\u3001\u7ffb\u8f6c\u3001\u8fc7\u6ee4\u3001\u6620\u5c04\u3001\u5408\u5e76\u4e0e\u53bb null \u7b49\u5e38\u7528\u52a8\u4f5c<\/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":[13417,13418,13419,99,1524],"topic":[],"class_list":["post-118152","post","type-post","status-publish","format-standard","hentry","category-server","tag-map","tag-13418","tag-13419","tag-java","tag-1524"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>19\u4e2a\u65b9\u6cd5\u641e\u5b9aMap\u5b89\u5168\u53d6\u503c\uff0c\u5d4c\u5957\u6570\u636e\u4e0d\u7528\u5c42\u5c42\u5224\u7a7a\u5f3a\u8f6c - \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\/118152.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"19\u4e2a\u65b9\u6cd5\u641e\u5b9aMap\u5b89\u5168\u53d6\u503c\uff0c\u5d4c\u5957\u6570\u636e\u4e0d\u7528\u5c42\u5c42\u5224\u7a7a\u5f3a\u8f6c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"&#x1f4cc; \u9ad8\u5e76\u53d1\u7cfb\u7edf\u8bbe\u8ba1&#xff1a; \u57fa\u4e8eRedis\u4e0eMQ\u7684\u79d2\u6740\u7cfb\u7edf\u67b6\u6784&#xff1a;\u5e93\u5b58\u9884\u51cf\u3001\u9632\u8d85\u5356\u4e0e\u9650\u6d41\u9632\u5237\u5168\u6d41\u7a0b\u89e3\u6790 &#x1f4cb; \u76ee\u5f55 \u4e00\u3001\u5de5\u5177\u7c7b\u529f\u80fd\u4e8c\u3001\u6240\u9700\u73af\u5883\u4e09\u3001\u65b9\u6cd5\u4e0e\u8c03\u7528\u793a\u4f8b&#xff08;\u6309\u9700\u8c03\u7528&#xff09;\u56db\u3001\u5de5\u5177\u7c7b\u6e90\u7801&#xff08;\u53ef\u76f4\u63a5\u590d\u5236&#xff09; \u4e00\u3001\u5de5\u5177\u7c7b\u529f\u80fd  \u8bfb\u5199 Map \u4e0d\u7528\u5148\u5224\u7a7a\u3001\u4e0d\u7528\u5c42\u5c42\u5f3a\u8f6c&#xff0c;\u53d6\u4e0d\u5230\u5c31\u6309\u9ed8\u8ba4\u503c\u515c\u5e95&#xff0c;\u53e6\u7ed9\u6784\u5efa\u3001\u7ffb\u8f6c\u3001\u8fc7\u6ee4\u3001\u6620\u5c04\u3001\u5408\u5e76\u4e0e\u53bb null \u7b49\u5e38\u7528\u52a8\u4f5c\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/118152.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-26T06:08:56+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=\"11 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/118152.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/118152.html\",\"name\":\"19\u4e2a\u65b9\u6cd5\u641e\u5b9aMap\u5b89\u5168\u53d6\u503c\uff0c\u5d4c\u5957\u6570\u636e\u4e0d\u7528\u5c42\u5c42\u5224\u7a7a\u5f3a\u8f6c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-26T06:08:56+00:00\",\"dateModified\":\"2026-10-26T06:08:56+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/118152.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/118152.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/118152.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"19\u4e2a\u65b9\u6cd5\u641e\u5b9aMap\u5b89\u5168\u53d6\u503c\uff0c\u5d4c\u5957\u6570\u636e\u4e0d\u7528\u5c42\u5c42\u5224\u7a7a\u5f3a\u8f6c\"}]},{\"@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":"19\u4e2a\u65b9\u6cd5\u641e\u5b9aMap\u5b89\u5168\u53d6\u503c\uff0c\u5d4c\u5957\u6570\u636e\u4e0d\u7528\u5c42\u5c42\u5224\u7a7a\u5f3a\u8f6c - \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\/118152.html","og_locale":"zh_CN","og_type":"article","og_title":"19\u4e2a\u65b9\u6cd5\u641e\u5b9aMap\u5b89\u5168\u53d6\u503c\uff0c\u5d4c\u5957\u6570\u636e\u4e0d\u7528\u5c42\u5c42\u5224\u7a7a\u5f3a\u8f6c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"&#x1f4cc; \u9ad8\u5e76\u53d1\u7cfb\u7edf\u8bbe\u8ba1&#xff1a; \u57fa\u4e8eRedis\u4e0eMQ\u7684\u79d2\u6740\u7cfb\u7edf\u67b6\u6784&#xff1a;\u5e93\u5b58\u9884\u51cf\u3001\u9632\u8d85\u5356\u4e0e\u9650\u6d41\u9632\u5237\u5168\u6d41\u7a0b\u89e3\u6790 &#x1f4cb; \u76ee\u5f55 \u4e00\u3001\u5de5\u5177\u7c7b\u529f\u80fd\u4e8c\u3001\u6240\u9700\u73af\u5883\u4e09\u3001\u65b9\u6cd5\u4e0e\u8c03\u7528\u793a\u4f8b&#xff08;\u6309\u9700\u8c03\u7528&#xff09;\u56db\u3001\u5de5\u5177\u7c7b\u6e90\u7801&#xff08;\u53ef\u76f4\u63a5\u590d\u5236&#xff09; \u4e00\u3001\u5de5\u5177\u7c7b\u529f\u80fd  \u8bfb\u5199 Map \u4e0d\u7528\u5148\u5224\u7a7a\u3001\u4e0d\u7528\u5c42\u5c42\u5f3a\u8f6c&#xff0c;\u53d6\u4e0d\u5230\u5c31\u6309\u9ed8\u8ba4\u503c\u515c\u5e95&#xff0c;\u53e6\u7ed9\u6784\u5efa\u3001\u7ffb\u8f6c\u3001\u8fc7\u6ee4\u3001\u6620\u5c04\u3001\u5408\u5e76\u4e0e\u53bb null \u7b49\u5e38\u7528\u52a8\u4f5c","og_url":"https:\/\/www.wsisp.com\/helps\/118152.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-26T06:08:56+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"11 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/118152.html","url":"https:\/\/www.wsisp.com\/helps\/118152.html","name":"19\u4e2a\u65b9\u6cd5\u641e\u5b9aMap\u5b89\u5168\u53d6\u503c\uff0c\u5d4c\u5957\u6570\u636e\u4e0d\u7528\u5c42\u5c42\u5224\u7a7a\u5f3a\u8f6c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-26T06:08:56+00:00","dateModified":"2026-10-26T06:08:56+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/118152.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/118152.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/118152.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"19\u4e2a\u65b9\u6cd5\u641e\u5b9aMap\u5b89\u5168\u53d6\u503c\uff0c\u5d4c\u5957\u6570\u636e\u4e0d\u7528\u5c42\u5c42\u5224\u7a7a\u5f3a\u8f6c"}]},{"@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\/118152","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=118152"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/118152\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=118152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=118152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=118152"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=118152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}