{"id":10006186,"date":"2022-08-12T11:10:51","date_gmt":"2022-08-12T03:10:51","guid":{"rendered":"https:\/\/ityet.com\/?p=10006186"},"modified":"2022-08-12T11:10:51","modified_gmt":"2022-08-12T03:10:51","slug":"%e5%88%ab%e5%86%8d%e4%b9%b1%e6%89%93%e6%97%a5%e5%bf%97%e4%ba%86%ef%bc%8c%e8%bf%99%e4%bb%bd-java-%e6%97%a5%e5%bf%97%e8%a7%84%e8%8c%83%ef%bc%8c%e5%ba%94%e6%9c%89%e5%b0%bd%e6%9c%89%ef%bc%8c%e5%bb%ba","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10006186","title":{"rendered":"\u522b\u518d\u4e71\u6253\u65e5\u5fd7\u4e86\uff0c\u8fd9\u4efd Java \u65e5\u5fd7\u89c4\u8303\uff0c\u5e94\u6709\u5c3d\u6709\uff0c\u5efa\u8bae\u6536\u85cf\uff01\uff01"},"content":{"rendered":"<h2><strong>1 \u7b80\u4ecb<\/strong><\/h2>\n<p>\u5728\u7a0b\u5e8f\u4e2d\u5199\u65e5\u5fd7\u662f\u4e00\u4ef6\u975e\u5e38\u91cd\u8981\uff0c\u4f46\u662f\u5f88\u5bb9\u6613\u88ab\u5f00\u53d1\u4eba\u5458\u5ffd\u89c6\u7684\u5730\u65b9\u3002\u5199\u597d\u7a0b\u5e8f\u7684\u65e5\u5fd7\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u5927\u5927\u51cf\u8f7b\u540e\u671f\u7ef4\u62a4\u538b\u529b\u3002\u5728\u5b9e\u9645\u7684\u5de5\u4f5c\u4e2d\uff0c\u5f00\u53d1\u4eba\u5458\u5f80\u5f80\u8feb\u4e8e\u5de8\u5927\u65f6\u95f4\u538b\u529b\uff0c\u800c\u5199\u65e5\u5fd7\u53c8\u662f\u4e00\u4e2a\u975e\u5e38\u7e41\u7410\u7684\u4e8b\u60c5\uff0c\u5f80\u5f80\u6ca1\u6709\u5f15\u8d77\u8db3\u591f\u7684\u91cd\u89c6\u3002<\/p>\n<blockquote><p>\u5f00\u53d1\u4eba\u5458\u5e94\u5728\u4e00\u5f00\u59cb\u5c31\u517b\u6210\u826f\u597d\u7684\u65e5\u5fd7\u64b0\u5199\u4e60\u60ef\uff0c\u5e76\u4e14\u5e94\u5728\u5b9e\u9645\u7684\u5f00\u53d1\u5de5\u4f5c\u4e2d\u4e3a\u5199\u65e5\u5fd7\u9884\u7559\u8db3\u591f\u7684\u65f6\u95f4\u3002<\/p><\/blockquote>\n<h3>1.1 \u65e5\u5fd7\u7684\u4f5c\u7528<\/h3>\n<p>\u4e00\u822c\u7a0b\u5e8f\u65e5\u5fd7\u51fa\u81ea\u4e0b\u9762\u51e0\u4e2a\u65b9\u9762\u7684\u9700\u6c42\uff1a<\/p>\n<ol>\n<li>\u8bb0\u5f55\u7528\u6237\u64cd\u4f5c\u7684\u5ba1\u8ba1\u65e5\u5fd7\uff0c\u751a\u81f3\u6709\u7684\u65f6\u5019\u5c31\u662f\u76d1\u7ba1\u90e8\u95e8\u7684\u8981\u6c42\u3002<\/li>\n<li>\u5feb\u901f\u5b9a\u4f4d\u95ee\u9898\u7684\u6839\u6e90<\/li>\n<li>\u8ffd\u8e2a\u7a0b\u5e8f\u6267\u884c\u7684\u8fc7\u7a0b\u3002<\/li>\n<li>\u8ffd\u8e2a\u6570\u636e\u7684\u53d8\u5316<\/li>\n<li>\u6570\u636e\u7edf\u8ba1\u548c\u6027\u80fd\u5206\u6790<\/li>\n<li>\u91c7\u96c6\u8fd0\u884c\u73af\u5883\u6570\u636e<\/li>\n<\/ol>\n<p>\u4e00\u822c\u5728\u7a0b\u5e8f\u4e0a\u7ebf\u4e4b\u540e\uff0c\u4e00\u65e6\u53d1\u751f\u5f02\u5e38\uff0c\u7b2c\u4e00\u4ef6\u4e8b\u5c31\u662f\u8981\u5f04\u6e05\u695a\u5f53\u65f6\u53d1\u751f\u4e86\u4ec0\u4e48\u3002\u7528\u6237\u5f53\u65f6\u505a\u4e86\u4ec0\u4e48\u64cd\u4f5c\uff0c\u73af\u5883\u6709\u65e0\u5f71\u54cd\uff0c\u6570\u636e\u6709\u4ec0\u4e48\u53d8\u5316\uff0c\u662f\u4e0d\u662f\u53cd\u590d\u53d1\u751f\u7b49\uff0c\u7136\u540e\u518d\u8fdb\u4e00\u6b65\u7684\u786e\u5b9a\u5927\u81f4\u662f\u54ea\u4e2a\u65b9\u9762\u7684\u95ee\u9898\u3002\u786e\u5b9a\u662f\u7a0b\u5e8f\u7684\u95ee\u9898\u4e4b\u540e\u518d\u4ea4\u7531\u5f00\u53d1\u4eba\u5458\u53bb\u91cd\u73b0\u3001\u7814\u7a76\u3001\u63d0\u51fa\u89e3\u51b3\u65b9\u6848\u3002\u8fd9\u65f6\uff0c\u65e5\u5fd7\u5c31\u7ed9\u6211\u4eec\u63d0\u4f9b\u4e86\u7b2c\u4e00\u624b\u7684\u8d44\u6599\u3002<\/p>\n<h3>1.2 \u64b0\u5199\u65e5\u5fd7\u7684\u8981\u6c42<\/h3>\n<p>\u65e2\u7136\u64b0\u5199\u65e5\u5fd7\u662f\u6709\u9700\u6c42\uff0c\u800c\u4e14\u4e5f\u80fd\u5728\u672a\u6765\u5e2e\u52a9\u6211\u4eec\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\u7684\u4e8b\u60c5\uff0c\u957f\u8fdc\u6765\u770b\u662f\u975e\u5e38\u6709\u5229\u7684\u4e00\u4ef6\u4e8b\u60c5\u3002\u56e0\u6b64\u6211\u4eec\u5e94\u8be5\u5728\u81ea\u5df1\u5f00\u53d1\u7684\u7a0b\u5e8f\u4e2d\u7b26\u5408\u89c4\u8303\u7684\u64b0\u5199\u65e5\u5fd7\uff0c\u5728\u5199\u65e5\u5fd7\u65f6\u8981\u6ce8\u610f\u4ee5\u4e0b\u7684\u95ee\u9898\u3002<\/p>\n<h4>1.2.1 \u65e5\u5fd7\u7684\u53ef\u8bfb\u6027<\/h4>\n<p>\u65e5\u5fd7\u65f6\u7ed9\u4eba\u8bfb\u7684\uff0c\u4e0d\u4ec5\u4ec5\u662f\u8ba9\u81ea\u5df1\u660e\u767d\uff0c\u4e5f\u8981\u8ba9\u6ca1\u6709\u63a5\u89e6\u8fc7\u6211\u4eec\u6e90\u4ee3\u7801\u7684\u5176\u4ed6\u7a0b\u5e8f\u5458\u4e5f\u80fd\u591f\u4e00\u76ee\u4e86\u7136\u3002\u6709\u7684\u540c\u4e8b\u5728\u65e5\u5fd7\u4e2d\u6253\u5370\u7279\u6b8a\u7684\u6807\u8bc6\u7b26\u53f7\uff0c\u4f8b\u5982\u201c<code>++++++++++<\/code>\u201d\uff0c \u201c<code>===========<\/code>\u201d\uff0c\u201c<code>\u2014\u2014\u2014\u2014\u2014<\/code>\u201d\uff0c\u8fd9\u4e9b\u7b26\u53f7\u4ee4\u4eba\u773c\u82b1\u7f2d\u4e71\u3002\u8fd9\u662f\u4e00\u79cd\u4e0d\u597d\u7684\u7f16\u7a0b\u4e60\u60ef\u3002<\/p>\n<p>\u53e6\u5916\uff0c\u628a\u65e5\u5fd7\u5206\u7c7b\u8f93\u51fa\u5230\u4e0d\u540c\u7684\u6587\u4ef6\u4e5f\u6709\u5229\u4e8e\u6211\u4eec\u6392\u9664\u5e72\u6270\uff0c\u8fc5\u901f\u627e\u5230\u6211\u4eec\u9700\u8981\u7684\u4fe1\u606f\u3002\u800c\u4e14\uff0c\u6700\u597d\u5728\u6253\u5370\u65e5\u5fd7\u65f6\u8f93\u51fa\u82f1\u6587\uff0c\u9632\u6b62\u4e2d\u6587\u4e0d\u652f\u6301\u800c\u6253\u5370\u51fa\u4e71\u7801\u7684\u60c5\u51b5\u3002<\/p>\n<h4>1.2.2 \u65e5\u5fd7\u7684\u6027\u80fd<\/h4>\n<p>\u65e0\u8bba\u6211\u4eec\u628a\u65e5\u5fd7\u5199\u5230\u6587\u4ef6\u8fd8\u662f\u6570\u636e\u5e93\uff0c\u90fd\u9700\u8981\u6d88\u8017IO\u8d44\u6e90\u3002\u9002\u5f53\u7684\u63a7\u5236\u65e5\u5fd7\u7684\u8f93\u51fa\u4e5f\u6709\u5229\u4e8e\u63d0\u9ad8\u7a0b\u5e8f\u7684\u6027\u80fd\u3002<\/p>\n<p>\u4f8b\u5982\uff1a\u5c3d\u91cf\u907f\u514d\u5728\u5728\u5927\u7684\u5faa\u73af\u4e2d\u6253\u5370\u610f\u4e49\u4e0d\u5927\u7684\u65e5\u5fd7\u5185\u5bb9\u3002\u8f93\u51fa\u65e5\u5fd7\u4e4b\u524d\u6700\u597d\u80fd\u5224\u65ad\u65e5\u5fd7\u7684\u7ea7\u522b(\u4f8b\u5982. debug\u524d\u5148\u8c03\u7528<code>isDebugEnabled()<\/code>\u4f5c\u51fa\u5224\u65ad)\u3002<\/p>\n<h4>1.2.3 \u5360\u7528\u78c1\u76d8\u7a7a\u95f4<\/h4>\n<p>\u901a\u5e38\uff0c\u6211\u4eec\u90fd\u662f\u628a\u65e5\u5fd7\u5199\u5165\u78c1\u76d8\u4e0a\u7684\u65e5\u5fd7\u6587\u4ef6\u4e2d\u3002\u9002\u5f53\u7684\u4f7f\u7528\u6eda\u52a8\u65e5\u5fd7\u5e76\u4e14\u5b9a\u65f6\u6e05\u9664\u65e7\u6587\u4ef6\u662f\u6709\u597d\u5904\u7684\u3002\u6211\u89c1\u8fc7\u8fd9\u6837\u4e00\u4e2a\u4f8b\u5b50\uff0c\u7a0b\u5e8f\u8fd0\u884c\u51e0\u6b21\u540e\u5c31\u8dd1\u4e0d\u8d77\u6765\u4e86\uff0c\u524d\u51e0\u6b21\u90fd\u662f\u6b63\u5e38\u7684\u3002<\/p>\n<p>\u600e\u4e48\u90fd\u60f3\u4e0d\u660e\u767d\u7a0b\u5e8f\u6709\u4ec0\u4e48\u95ee\u9898\uff0c\u6700\u540e\u624d\u53d1\u73b0\u5c45\u7136\u662f\u65e5\u5fd7\u6587\u4ef6\u5360\u6ee1\u4e86\u78c1\u76d8\u7a7a\u95f4\u3002\u5728\u5b9e\u9645\u7684\u5e94\u7528\u4e2d\u51fa\u73b0\u4e0aG\u7684\u65e5\u5fd7\u6587\u4ef6\u4e5f\u5f80\u5f80\u4e0d\u5c11\u89c1\uff0c\u8981\u5728\u8fd9\u6837\u89c4\u6a21\u7684\u65e5\u5fd7\u6587\u4ef6\u4e2d\u627e\u51fa\u5bf9\u89e3\u51b3\u95ee\u9898\u6709\u7528\u7684\u4fe1\u606f\u4e5f\u662f\u4e00\u5927\u6311\u6218\u3002<\/p>\n<h4>1.2.4 \u65e5\u5fd7\u7684\u65f6\u6548\u6027<\/h4>\n<p>\u6709\u7684\u65f6\u5019\u6211\u4eec\u5e76\u4e0d\u80fd\u53ca\u65f6\u7684\u53d1\u73b0\u95ee\u9898\u3002\u9700\u8981\u8ffd\u6eaf\u4e4b\u524d\u7684\u65e5\u5fd7\u3002\u6240\u4ee5\u6211\u4eec\u662f\u9700\u8981\u4fdd\u7559\u4e00\u6bb5\u65f6\u95f4\u4ee5\u5185\u7684\u65e5\u5fd7\u4fbf\u4e8e\u8ffd\u6eaf\u3002<\/p>\n<h4>1.2.5 \u65e5\u5fd7\u7ea7\u522b<\/h4>\n<p>\u901a\u5e38\u6211\u4eec\u5728\u4ea7\u54c1\u73af\u5883\u4e2d\u65e5\u5fd7\u7684\u7ea7\u522b\u90fd\u5728INFO\u4ee5\u4e0a\uff0c\u6240\u4ee5\u6211\u4eec\u5fc5\u987b\u4fdd\u8bc1\u5728\u8fd9\u6837\u7684\u60c5\u51b5\u4e0b\u7a0b\u5e8f\u4ecd\u7136\u80fd\u591f\u8f93\u51fa\u8db3\u591f\u6211\u4eec\u4f5c\u51fa\u5224\u65ad\u7684\u4fe1\u606f\u3002<\/p>\n<p>\u4f8b\u5982\u5e38\u89c1\u7684\u7cfb\u7edf\u5177\u6709\u5982\u4e0b\u7684\u65e5\u5fd7\u7ea7\u522b\uff1a<\/p>\n<pre><code>\/\/ \u5b9a\u4e49FATAL\u7ea7\u522b\u8f93\u51fa\u5b8f\n#define DRV_LOG_FATAL(fmt, ...)           hlog_format(HLOG_LEVEL_FATAL, &quot;PluginDriver&quot;,   &quot;[%s(%d)] &quot;fmt, __FUNCTION__,   __LINE__, ##__VA_ARGS__)\n\n\/\/ \u5b9a\u4e49ERROR\u7ea7\u522b\u8f93\u51fa\u5b8f\n#define DRV_LOG_ERROR(fmt, ...)           hlog_format(HLOG_LEVEL_ERROR, &quot;PluginDriver&quot;,   &quot;[%s(%d)] &quot;fmt, __FUNCTION__,   __LINE__, ##__VA_ARGS__)\n\n\/\/ \u5b9a\u4e49WARN\u7ea7\u522b\u8f93\u51fa\u5b8f\n#define DRV_LOG_WARN(fmt, ...)          hlog_format(HLOG_LEVEL_WARN, &quot;PluginDriver&quot;,   &quot;[%s(%d)] &quot;fmt, __FUNCTION__,   __LINE__, ##__VA_ARGS__)  \n\n\/\/ \u5b9a\u4e49INFO\u7ea7\u522b\u8f93\u51fa\u5b8f\n#define DRV_LOG_INFO(fmt, ...)          hlog_format(HLOG_LEVEL_INFO, &quot;PluginDriver&quot;,   &quot;[%s(%d)] &quot;fmt, __FUNCTION__,   __LINE__, ##__VA_ARGS__)  \n\n\/\/ \u5b9a\u4e49DEBUG\u7ea7\u522b\u8f93\u51fa\u5b8f\n#define DRV_LOG_DEBUG(fmt, ...)           hlog_format(HLOG_LEVEL_DEBUG, &quot;PluginDriver&quot;,   &quot;[%s(%d)] &quot;fmt, __FUNCTION__,   __LINE__, ##__VA_ARGS__)   \n\/\/ \u5b9a\u4e49TRACE\u7ea7\u522b\u8f93\u51fa\u5b8f\n#define DRV_LOG_TRACE(fmt,   ...)         hlog_format(HLOG_LEVEL_TRACE, &quot;PluginDriver&quot;,   &quot;[%s(%d)] &quot;fmt, __FUNCTION__,   __LINE__, ##__VA_ARGS__)  <\/code><\/pre>\n<p>\u4e0a\u8ff0\u7684\u65e5\u5fd7\u6587\u4ef6\u4e2d\u5b9a\u4e49\u4e866\u79cd\u65e5\u5fd7\u7ea7\u522b\uff0c\u4e0d\u540c\u7ea7\u522b\u7684\u542b\u4e49\u5728\u4e0b\u6587\u8be6\u8ff0\uff0c\u9700\u8981\u4e86\u89e3\u5230\u5728\u4e00\u4e2a\u7a0b\u5e8f\u5f00\u53d1\u7684\u8fc7\u7a0b\u4e2d\u9700\u8981\u7ef4\u62a4\u4e0d\u540c\u7684\u5206\u522b\u4e3a<code>FATAL\uff0c ERROR\uff0c EARN\uff0c INFO\uff0c DEBUG\uff0c TRACE<\/code>\u3002<\/p>\n<h4>1.2.6 \u65e5\u5fd7\u5185\u5bb9<\/h4>\n<p>\u6211\u4eec\u5728\u5199\u65e5\u5fd7\u7684\u65f6\u5019\uff0c\u9700\u8981\u6ce8\u610f\u8f93\u51fa\u9002\u5f53\u7684\u5185\u5bb9\u3002\u9996\u5148\uff0c\u5c3d\u91cf\u4f7f\u7528\u4e1a\u52a1\u76f8\u5173\u7684\u63cf\u8ff0\u3002\u6211\u4eec\u7684\u7a0b\u5e8f\u662f\u5b9e\u73b0\u67d0\u79cd\u4e1a\u52a1\u7684\uff0c\u90a3\u4e48\u5c31\u6700\u597d\u80fd\u63cf\u8ff0\u6e05\u695a\u8fd9\u4e2a\u65f6\u5019\u8d70\u5230\u4e86\u4e1a\u52a1\u8fc7\u7a0b\u7684\u54ea\u4e00\u6b65\u3002<\/p>\n<p>\u5176\u6b21\uff0c\u907f\u514d\u5728\u65e5\u5fd7\u4e2d\u8f93\u51fa\u4e00\u4e9b\u654f\u611f\u4fe1\u606f\uff0c\u4f8b\u5982\u7528\u6237\u540d\u548c\u5bc6\u7801\u3002\u4ee5\u53ca\uff0c\u8981\u4fdd\u6301\u7f16\u7801\u7684\u4e00\u81f4\u3002\u5982\u679c\u4e0d\u80fd\u4fdd\u8bc1\u5c31\u5c3d\u91cf\u4f7f\u7528\u82f1\u6587\u800c\u4e0d\u662f\u4e2d\u6587\u3002\u8fd9\u6837\u5f53\u6211\u4eec\u62ff\u5230\u65e5\u5fd7\u4e4b\u540e\u5c31\u4e0d\u4f1a\u56e0\u4e3a\u770b\u5230\u4e00\u5806\u4e71\u7801\u800c\u4e0d\u77e5\u6240\u4e91\u4e86\u3002<\/p>\n<h4>1.2.7 \u65e5\u5fd7\u683c\u5f0f<\/h4>\n<p>\u5e38\u89c1\u7684\u65e5\u5fd7\u683c\u5f0f\u4e2d\u5bf9\u4e8e\u6bcf\u4e00\u6761\u65e5\u5fd7\u5e94\u542b\u6709\u7684\u4fe1\u606f\u5305\u62ec\u65e5\u671f\u3001\u65f6\u95f4\u3001\u65e5\u5fd7\u7ea7\u522b\u3001\u4ee3\u7801\u4f4d\u7f6e\u3001\u65e5\u5fd7\u5185\u5bb9\u3001\u9519\u8bef\u7801\u7b49\u4fe1\u606f\u3002<\/p>\n<p>\u4e0b\u9762\u662f\u4e00\u4e2a\u5de5\u4f5c\u4e2d\u7684\u65e5\u5fd7\u6587\u4ef6\u7684\u4e00\u90e8\u5206\u5185\u5bb9\uff1a<\/p>\n<pre><code>2018-05-22 15:35:53.850 TRACE TDWZLog [0x00001b10] &lt;36&gt; &lt;TDWZProtocol::Init&gt;,TDWZProtocol::Init\n2018-05-22 15:35:53.850 TRACE TDWZLog [0x00001b10] &lt;89&gt; &lt;TDWZProtocol::Init&gt;,End in processing TDWZProtocol::Init\n2018-05-22 15:35:53.853 TRACE TDWZLog [0x00001b10] &lt;142&gt;    &lt;TDWZProtocol::Connect&gt;,Connect Execute finish\n2018-05-22 15:35:53.853 TRACE TDWZLog [0x00002f10] &lt;149&gt;    &lt;GetAlarmEventPro&gt;,Enter GetAlarmEventPro func\n2018-05-22 15:39:36.382 WARN TrackLog [0x000029fc] - [ internal WARN htrace_server_convert_msgstring_to_contextintls(493) ] detect input id error, trace_id span_id,this chain may not be tracked.\n2018-05-22 15:39:36.383 WARN TrackLog [0x000029fc] - [ internal WARN htrace_server_receive(195) ] can not detect trace_id in context, this chain may not be tracked.\n2018-05-22 15:39:36.383 TRACE TDWZLog [0x000029fc] &lt;231&gt;    &lt;TDWZProtocol::DisConnect&gt;,TDWZProtocol::DisConnect\n2018-05-22 15:39:37.502 TRACE TDWZLog [0x00002f10] &lt;225&gt;    &lt;GetAlarmEventPro&gt;,End Get AlarmEventPro Func\n2018-05-22 15:39:37.503 TRACE TDWZLog [0x000029fc] &lt;241&gt;    &lt;TDWZProtocol::DisConnect&gt;,close socket\n2018-05-22 15:39:37.503 TRACE TDWZLog [0x000029fc] &lt;242&gt;    &lt;TDWZProtocol::DisConnect&gt;,Execute DisConnect function succeed.<\/code><\/pre>\n<p>\u53ef\u4ee5\u4ece\u8be5\u6587\u4ef6\u4e2d\u770b\u51fa\u4e00\u822c\u65e5\u5fd7\u6587\u4ef6\u4e2d\u5e94\u8be5\u542b\u6709\u7684\u4fe1\u606f\u3002<\/p>\n<h2><strong>2 \u65e5\u5fd7\u7ea7\u522b\u548c\u542b\u4e49<\/strong><\/h2>\n<p>Log4j\u662fApache\u7684\u4e00\u4e2a\u5f00\u6e90\u9879\u76ee\uff0c\u901a\u8fc7\u4f7f\u7528Log4j\uff0c\u6211\u4eec\u53ef\u4ee5\u63a7\u5236\u65e5\u5fd7\u4fe1\u606f\u8f93\u51fa\u76ee\u7684\u5730\u662f\u63a7\u5236\u53f0\u3001\u6587\u4ef6\u3001GUI\u7ec4\u4ef6\u751a\u81f3\u662f\u5957\u63a5\u53e3\u670d\u52a1\u5668\uff1b\u6211\u4eec\u4e5f\u53ef\u4ee5\u63a7\u5236\u6bcf\u4e00\u6761\u65e5\u5fd7\u7684\u8f93\u51fa\u683c\u5f0f\uff1b\u901a\u8fc7\u5b9a\u4e49\u6bcf\u4e00\u6761\u65e5\u5fd7\u4fe1\u606f\u7684\u7ea7\u522b\uff0c\u6211\u4eec\u80fd\u591f\u66f4\u52a0\u7ec6\u81f4\u5730\u63a7\u5236\u65e5\u5fd7\u7684\u751f\u6210\u8fc7\u7a0b\u3002<\/p>\n<p>\u6700\u4ee4\u4eba\u611f\u5174\u8da3\u7684\u5c31\u662f\uff0c\u8fd9\u4e9b\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\u6765\u7075\u6d3b\u5730\u8fdb\u884c\u914d\u7f6e\uff0c\u800c\u4e0d\u9700\u8981\u4fee\u6539\u5e94\u7528\u7684\u4ee3\u7801\u3002<\/p>\n<h3>2.1 Log4j\u7684\u7ec4\u6210<\/h3>\n<p>Log4j\u7531\u4e09\u4e2a\u91cd\u8981\u7684\u7ec4\u6210\u6784\u6210\uff1a\u65e5\u5fd7\u8bb0\u5f55\u5668(Loggers)\uff0c\u8f93\u51fa\u7aef(Appenders)\u548c\u65e5\u5fd7\u683c\u5f0f\u5316\u5668(Layout)\u3002<\/p>\n<h4>2.1.1 Logger<\/h4>\n<p>\u63a7\u5236\u8981\u542f\u7528\u6216\u7981\u7528\u54ea\u4e9b\u65e5\u5fd7\u8bb0\u5f55\u8bed\u53e5\uff0c\u5e76\u5bf9\u65e5\u5fd7\u4fe1\u606f\u8fdb\u884c\u7ea7\u522b\u9650\u5236<\/p>\n<h4>2.1.2 Appenders<\/h4>\n<p>\u6307\u5b9a\u4e86\u65e5\u5fd7\u5c06\u6253\u5370\u5230\u63a7\u5236\u53f0\u8fd8\u662f\u6587\u4ef6\u4e2d.<\/p>\n<h4>2.1.3 Layout<\/h4>\n<p>\u63a7\u5236\u65e5\u5fd7\u4fe1\u606f\u7684\u663e\u793a\u683c\u5f0f\u3002<\/p>\n<h3>2.2 \u65e5\u5fd7\u7ea7\u522b<\/h3>\n<p>Log4j\u4e2d\u5c06\u8981\u8f93\u51fa\u7684Log\u4fe1\u606f\u5b9a\u4e49\u4e866\u79cd\u7ea7\u522b\uff0c\u4f9d\u6b21\u4e3a<code>TRACE\u3001DEBUG\u3001INFO\u3001WARN\u3001ERROR\u548cFATAL<\/code>\uff0c\u5f53\u8f93\u51fa\u65f6\uff0c\u53ea\u6709\u7ea7\u522b\u9ad8\u8fc7\u914d\u7f6e\u4e2d\u89c4\u5b9a\u7684 \u7ea7\u522b\u7684\u4fe1\u606f\u624d\u80fd\u771f\u6b63\u7684\u8f93\u51fa\uff0c\u8fd9\u6837\u5c31\u5f88\u65b9\u4fbf\u7684\u6765\u914d\u7f6e\u4e0d\u540c\u60c5\u51b5\u4e0b\u8981\u8f93\u51fa\u7684\u5185\u5bb9\uff0c\u800c\u4e0d\u9700\u8981\u66f4\u6539\u4ee3\u7801\uff0c\u975e\u5e38\u65b9\u4fbf\u5feb\u6377\u3002<\/p>\n<h4>2.2.1 TRACE<\/h4>\n<p><code>TRACE designates finer-grained informational events than the DEBUG.Since:1.2.12<\/code>\uff0c\u5f88\u4f4e\u7684\u65e5\u5fd7\u7ea7\u522b\uff0c\u4e00\u822c\u4e0d\u4f1a\u4f7f\u7528\u3002TRACE\u4e00\u822c\u8ddf\u8e2a\u7684\u662f\u51fd\u6570\u7684\u8c03\u7528\uff0c\u5e76\u4e14TRACE\u4e0d\u5e94\u8be5\u542b\u6709\u53d8\u91cf\u53c2\u6570\uff0c\u800c\u4ec5\u80fd\u63d0\u793a\u51fd\u6570\u7684\u8c03\u7528\u5173\u7cfb\u3002<\/p>\n<h4>2.2.2 DEBUG<\/h4>\n<p>\u4e00\u822c\u7528\u4e8e\u7ec6\u7c92\u5ea6\u7ea7\u522b\u4e0a\uff0c\u5bf9\u8c03\u8bd5\u5e94\u7528\u7a0b\u5e8f\u975e\u5e38\u6709\u5e2e\u52a9\uff0c\u4e3b\u8981\u7528\u4e8e\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u6253\u5370\u4e00\u4e9b\u8fd0\u884c\u4fe1\u606f\u3002<\/p>\n<h4>2.2.3 INFO<\/h4>\n<p>INFO\u6d88\u606f\u5728\u7c97\u7c92\u5ea6\u7ea7\u522b\u4e0a\u7a81\u51fa\u5f3a\u8c03\u5e94\u7528\u7a0b\u5e8f\u7684\u8fd0\u884c\u8fc7\u7a0b\u3002\u6253\u5370\u4e00\u4e9b\u4f60\u611f\u5174\u8da3\u7684\u6216\u8005\u91cd\u8981\u7684\u4fe1\u606f\uff0c\u8fd9\u4e2a\u53ef\u4ee5\u7528\u4e8e\u751f\u4ea7\u73af\u5883\u4e2d\u8f93\u51fa\u7a0b\u5e8f\u8fd0\u884c\u7684\u4e00\u4e9b\u91cd\u8981\u4fe1\u606f\uff0c\u4f46\u662f\u4e0d\u80fd\u6ee5\u7528\uff0c\u907f\u514d\u6253\u5370\u8fc7\u591a\u7684\u65e5\u5fd7\u3002<\/p>\n<h4>2.2.4 WARN<\/h4>\n<p>WARN\u8868\u793a\u4f1a\u51fa\u73b0\u6f5c\u5728\u9519\u8bef\u7684\u60c5\u5f62\uff0c\u6709\u4e9b\u4fe1\u606f\u4e0d\u662f\u9519\u8bef\u4fe1\u606f\uff0c\u4f46\u662f\u4e5f\u8981\u7ed9\u7a0b\u5e8f\u5458\u4e00\u4e9b\u63d0\u793a\u3002\u8be5\u7ea7\u522b\u8868\u793a\u7a0b\u5e8f\u4f1a\u81ea\u52a8\u8c03\u6574\u5230\u6b63\u5e38\u7684\u72b6\u6001\uff0c\u7c7b\u4f3c\u53c2\u6570\u672a\u4f20\u5165\uff0c\u4f7f\u7528\u4e86\u9ed8\u8ba4\u7684\u53c2\u6570\uff0c\u4ecd\u7b26\u5408\u7a0b\u5e8f\u5458\u9884\u671f\u4e4b\u5185\u7684\u60c5\u51b5\u3002<\/p>\n<h4>2.2.5 ERROR<\/h4>\n<p>ERROR\u6307\u51fa\u867d\u7136\u53d1\u751f\u9519\u8bef\u4e8b\u4ef6\uff0c\u4f46\u4ecd\u7136\u4e0d\u5f71\u54cd\u7cfb\u7edf\u7684\u7ee7\u7eed\u8fd0\u884c\u3002\u6253\u5370\u9519\u8bef\u548c\u5f02\u5e38\u4fe1\u606f\uff0c\u5982\u679c\u4e0d\u60f3\u8f93\u51fa\u592a\u591a\u7684\u65e5\u5fd7\uff0c\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e2a\u7ea7\u522b\u3002\u4e00\u822c\u5728WARN\u4e4b\u540e\u7684\u7ea7\u522b\u5728\u6253\u5370\u9519\u8bef\u65f6\uff0c\u5e94\u8be5\u540c\u65f6\u6253\u5370\u9519\u8bef\u7801\u3002<\/p>\n<h4>2.2.6 FATAL<\/h4>\n<p>FATAL\u6307\u51fa\u6bcf\u4e2a\u4e25\u91cd\u7684\u9519\u8bef\u4e8b\u4ef6\u5c06\u4f1a\u5bfc\u81f4\u5e94\u7528\u7a0b\u5e8f\u7684\u9000\u51fa\uff0c\u8fd9\u4e2a\u7ea7\u522b\u6bd4\u8f83\u9ad8\uff0c\u91cd\u5927\u9519\u8bef\uff0c\u7a0b\u5e8f\u65e0\u6cd5\u6062\u590d\uff0c\u5fc5\u987b\u901a\u8fc7\u91cd\u542f\u7a0b\u5e8f\u6765\u89e3\u51b3\u3002<\/p>\n<h3>2.3 \u65e5\u5fd7\u7ea7\u522b\u5927\u5c0f\u5173\u7cfb<\/h3>\n<p>\u65e5\u5fd7\u7ea7\u522b\u5c31\u50cf\u5f00\u5173\u4e00\u6837\uff0c\u6765\u51b3\u5b9a\u54ea\u4e9b\u65e5\u5fd7\u65b9\u6cd5\u88ab\u8c03\u7528\uff0c\u54ea\u4e9b\u4e0d\u88ab\u8c03\u7528\u3002\u5728log4j\u4e2d\uff0c\u65e5\u5fd7\u7ea7\u522b\u7684\u5173\u7cfb\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre><code>ALL&lt;TRACE&lt;DEBUG&lt;INFO&lt;WARN&lt;ERROR&lt;FATAL&lt;OFF<\/code><\/pre>\n<p>\u8bbe\u7f6e\u4e86\u5bf9\u5e94\u7684\u7ea7\u522b\u4e4b\u540e\uff0c\u65e5\u5fd7\u6846\u67b6\u5c31\u53ea\u8c03\u7528\u5927\u4e8e\u7b49\u4e8e\u8fd9\u4e2a\u7ea7\u522b\u7684\u65b9\u6cd5\u3002Log4j\u5efa\u8bae\u53ea\u4f7f\u7528\u5982\u4e0b\u7684\u56db\u4e2a\u754c\u522b<\/p>\n<pre><code>DEBUG&lt;INFO&lt;WARN&lt;ERROR<\/code><\/pre>\n<h2><strong>3 \u65e5\u5fd7\u89c4\u8303\u793a\u4f8b<\/strong><\/h2>\n<p>\u6a21\u4eff\uff0c\u6284\u5199\u662f\u6bd4\u8f83\u597d\u7684\u5b66\u4e60\u65b9\u5f0f\uff0c\u501f\u9274\u524d\u4eba\u64b0\u5199\u65e5\u5fd7\u7684\u826f\u597d\u98ce\u683c\u4ee5\u5f62\u6210\u81ea\u5df1\u7684\u98ce\u683c\u662f\u4e0d\u9519\u7684\u65b9\u5f0f\u3002\u4e0b\u9762\u662f\u4e00\u4e9b\u4e0d\u9519\u7684\u65e5\u5fd7\u8bb0\u5f55\u3002<\/p>\n<h3>3.1 TRACE\u65e5\u5fd7\u8bb0\u5f55\u793a\u4f8b<\/h3>\n<pre><code>DRV_LOG_TRACE(&quot;Connect Execute start&quot;);\nDRV_LOG_TRACE(&quot;Connect Execute finish&quot;);\nDRV_LOG_TRACE(&quot;DisConnect func&quot;);\nDRV_LOG_TRACE(&quot;Execute DisConnect function succeed.&quot;);\nDRV_LOG_TRACE(&quot;Enter UploadEvent Func&quot;);\nDRV_LOG_TRACE(&quot;extInfo = %s&quot;, Extension);\nDRV_LOG_TRACE(&quot;Send a Msg &quot;);\nDRV_LOG_TRACE(&quot;- Connect Execute start&quot;);\nDRV_LOG_TRACE(&quot;- Connect Execute finish&quot;);\nDRV_LOG_TRACE(&quot;- Enter GetAlarmEventPro func&quot;);\nDRV_LOG_TRACE(&quot;- Receive an info&quot;);\nDRV_LOG_TRACE(&quot;- End Get AlarmEventPro Func&quot;);\nDRV_LOG_TRACE(&quot;- DisConnect func&quot;);\nDRV_LOG_TRACE(&quot;- Execute DisConnect function succeed.&quot;);\nDRV_LOG_TRACE(&quot;- Enter UploadEvent Func&quot;);\nDRV_LOG_TRACE(&quot;- Leave UploadEvent Func&quot;);\nDRV_LOG_TRACE(&quot;- ============\u7535\u7f51\u62a5\u8b66\u89e6\u53d1&quot;);\nDRV_LOG_TRACE(&quot;- ============\u5f00\u59cb\u53d1\u9001\u7535\u6d41\u7535\u538b\u503c&quot;);\nDRV_LOG_TRACE(&quot;- ============\u95f4\u9694\u8d85\u8fc7\u5206\u949f\u518d\u6b21\u53d1\u9001\u7535\u6d41\u7535\u538b\u503c&quot;);<\/code><\/pre>\n<h3>3.2 INFO\u65e5\u5fd7\u8bb0\u5f55\u793a\u4f8b<\/h3>\n<pre><code>DRV_LOG_INFO(&quot;- UpdataEvent  nchal= %d,EventID = %d.&quot;,iChannelNo,nEventType);\nDRV_LOG_INFO(&quot;- do not support doControl&quot;);\nDRV_LOG_INFO(&quot;- channelId = %s, nStatusType = %d&quot;, channelId.c_str(), nStatusType);<\/code><\/pre>\n<h3>3.3 DEBUG\u65e5\u5fd7\u8bb0\u5f55\u793a\u4f8b<\/h3>\n<pre><code>DRV_LOG_DEBUG(&quot;- \u8f93\u51fa\u62a5\u8b66\u60c5\u51b5:\u7535\u7f51\u7f16\u53f7:%d,\u62a5\u8b66\u6570\u91cf:%d,\u62a5\u8b66\u5185\u5bb9:%s.&quot;,datas.data1.chn,datas.data1.alarm_num,datas.data1.alarms);\nDRV_LOG_DEBUG(&quot;- \u8f93\u51fa\u62a5\u8b66\u60c5\u51b5:\u7535\u7f51\u7f16\u53f7:%d,\u62a5\u8b66\u6570\u91cf:%d,\u62a5\u8b66\u5185\u5bb9:%s.&quot;,datas.data2.chn,datas.data2.alarm_num,datas.data2.alarms);\nDRV_LOG_DEBUG(&quot;- \u8f93\u51fa\u62a5\u8b66\u60c5\u51b5:\u7535\u7f51\u7f16\u53f7:%d,\u62a5\u8b66\u6570\u91cf:%d,\u62a5\u8b66\u5185\u5bb9:%s.&quot;,datas.data3.chn,datas.data3.alarm_num,datas.data3.alarms);\nDRV_LOG_DEBUG(&quot;- \u8f93\u51fa\u62a5\u8b66\u60c5\u51b5:\u7535\u7f51\u7f16\u53f7:%d,\u62a5\u8b66\u6570\u91cf:%d,\u62a5\u8b66\u5185\u5bb9:%s.&quot;,datas.data4.chn,datas.data4.alarm_num,datas.data4.alarms);\nDRV_LOG_DEBUG(&quot;- ============datas.data1.huab = %d&quot;,datas.data1.huab);\nDRV_LOG_DEBUG(&quot;- ============datas.data1.hiab = %d&quot;,datas.data1.hiab);\nDRV_LOG_DEBUG(&quot;- ============datas.data2.huab = %d&quot;,datas.data2.huab);\nDRV_LOG_DEBUG(&quot;- ============datas.data2.hiab = %d&quot;,datas.data2.hiab);\nDRV_LOG_DEBUG(&quot;- ============datas.data3.huab = %d&quot;,datas.data3.huab);\nDRV_LOG_DEBUG(&quot;- ============datas.data3.hiab = %d&quot;,datas.data3.hiab);\nDRV_LOG_DEBUG(&quot;- ============datas.data4.huab = %d&quot;,datas.data4.huab);\nDRV_LOG_DEBUG(&quot;- ============datas.data4.hiab = %d&quot;,datas.data4.hiab);\nDRV_LOG_DEBUG(&quot;- Alarm is : %s&quot;,szEvent.c_str());\nDRV_LOG_DEBUG(&quot;- GetChannelExtInfo channelId=%s&quot;, channelId.c_str());\nDRV_LOG_DEBUG(&quot;- nChan = %d, szInfo = %s&quot;, nChan, szInfo);<\/code><\/pre>\n<h3>3.4 WARN\u65e5\u5fd7\u8bb0\u5f55\u793a\u4f8b<\/h3>\n<pre><code>DRV_LOG_WARN(&quot;[0x%08x] - invaild event msg,discard it&quot;, DRV_INVALID_ARG);\nDRV_LOG_WARN(&quot;[0x%08x] - Can't find channel by channelId&quot;);\nDRV_LOG_WARN(&quot;[0x%08x] - [DWSdk.errorcode=0x%08x]Connect device failed&quot;, DRV_CONNECT_FAILED, sdkErrCode);\nDRV_LOG_WARN(&quot;[0x%08x] - [DWSdk.errorcode=0x%08x]dw_start_receive failed&quot;, DRV_ERROR, sdkErrCode);\nDRV_LOG_WARN(&quot;[0x%08x] - [DWSdk.errorcode=0x%08x]Communicate failed, socket recv error&quot;, DRV_ERROR, DW_SOCKET_RECV_ERROR);\nDRV_LOG_WARN(&quot;[0x%08x] - [DWSdk.errorcode=0x%08x&gt;other error&quot;, DRV_ERROR, iGetResult);\nDRV_LOG_WARN(&quot;[0x%08x] - [DWSdk.errorcode=0x%08x&gt;other error&quot;, DRV_ERROR, iGetResult);\nDRV_LOG_WARN(&quot;[0x%08x] - SetEventCallBack should be called first&quot;, DRV_ERROR);<\/code><\/pre>\n<h3>3.5 ERROR\u65e5\u5fd7\u8bb0\u5f55\u793a\u4f8b<\/h3>\n<pre><code>DRV_LOG_ERROR(&quot;Init DwSDK filded;&lt;errCode=%d&gt;&quot;, initRet); \nDRV_LOG_ERROR(&quot;Connect device failed&quot;);\nDRV_LOG_ERROR(&quot;Create thread failed&quot;);\nDRV_LOG_ERROR(&quot;dw_start_receive failed&quot;);\nDRV_LOG_ERROR(&quot;Communicate failed, socket recv error&quot;);\nDRV_LOG_ERROR(&quot;other error&lt;errCode=%d&gt;&quot;, iGetResult);\nDRV_LOG_ERROR(&quot;SetEventCallBack should be called first&quot;);\n\nDRV_LOG_ERROR(&quot;[0x%08x] - [DWSdk.errorcode=0x%08x]Init DwSDK filded&quot;, DRV_INIT_FAILED, initRet);\nDRV_LOG_ERROR(&quot;- [HPR.errorcode=0x%08x]Create thread failed&quot;, HPR_GetLastError());<\/code><\/pre>\n<p>\u4e0a\u8ff0\u4ee3\u7801\u4e2d<code>[0x%08x]<\/code>\u6709\u4e0b\u8ff0\u4f5c\u7528\uff1a<\/p>\n<p>\u8be5\u8bed\u53e5\u51fa\u73b0\u4e8e\u683c\u5f0f\u5316\u8f93\u51fa\u65f6\u7684\u683c\u5f0f\u5b57\u7b26\u4e32\u4e2d\u3002\u5f62\u5f0f\u4e3a<\/p>\n<pre><code>&quot;0x%08x&quot;<\/code><\/pre>\n<p>\u5176\u4e2d\uff0c<code>0x<\/code>\u4e3a\u666e\u901a\u5b57\u7b26\uff0c\u8f93\u51fa\u7684\u65f6\u5019\u4f1a\u539f\u6837\u8f93\u51fa\u4e3a<code>0x<\/code>\u3002<\/p>\n<p><code>%08x<\/code>\u4e3a\u6574\u578b\u4ee516\u8fdb\u5236\u65b9\u5f0f\u8f93\u51fa\u7684\u683c\u5f0f\u5b57\u7b26\u4e32\uff0c\u4f1a\u628a\u540e\u7eed\u5bf9\u5e94\u53c2\u6570\u7684\u6574\u578b\u6570\u5b57\uff0c\u4ee516\u8fdb\u5236\u8f93\u51fa\u300208\u7684\u542b\u4e49\u4e3a\uff0c\u8f93\u51fa\u768416\u8fdb\u5236\u503c\u53608\u4f4d\uff0c\u4e0d\u8db3\u90e8\u5206\u5de6\u4fa7\u88650\u3002<\/p>\n<p>\u4e8e\u662f\uff0c\u5982\u679c\u6267\u884c<\/p>\n<pre><code>printf(&quot;0x%08x&quot;, 0x1234);<\/code><\/pre>\n<p>\u4f1a\u8f93\u51fa<code>0x00001234<\/code>\u3002<\/p>\n<blockquote><p>\u7248\u6743\u58f0\u660e\uff1a\u672c\u6587\u4e3aCSDN\u535a\u4e3b\u300c\u601d\u5f71\u5f71\u601d\u300d\u7684\u539f\u521b\u6587\u7ae0\uff0c\u9075\u5faaCC 4.0 BY-SA\u7248\u6743\u534f\u8bae\uff0c\u8f6c\u8f7d\u8bf7\u9644\u4e0a\u539f\u6587\u51fa\u5904\u94fe\u63a5\u53ca\u672c\u58f0\u660e\u3002\u539f\u6587\u94fe\u63a5\uff1a<a href=\"https:\/\/link.segmentfault.com\/?enc=WJK901Lvs6PnQnGz2Ph%2F5g%3D%3D.Y0kjMjumE6Mp%2FP%2FRigxALoFCKeDeVJu6F5nFewYOLQVvIp7N7to1BEzzOkI6QKzXyAxTdMqrPKA8v9y17WBzDQ%3D%3D\" rel=\"nofollow\">https:\/\/blog.csdn.net\/lk14250&#8230;<\/a><\/p><\/blockquote>\n<p><strong>\u8fd1\u671f\u70ed\u6587\u63a8\u8350\uff1a<\/strong><\/p>\n<p>1.<a href=\"https:\/\/link.segmentfault.com\/?enc=lhL%2Fa6LA4VWMmHIdLZQw9A%3D%3D.QKoyx%2B6w8K3Q8BxuxFtqJHR13iZ5ef9gKlPgwYlTOrQ%3D\" rel=\"nofollow\">1,000+ \u9053 Java\u9762\u8bd5\u9898\u53ca\u7b54\u6848\u6574\u7406(2022\u6700\u65b0\u7248)<\/a><\/p>\n<p>2.<a href=\"https:\/\/link.segmentfault.com\/?enc=9lheVr74BKcr%2BeDIO1%2F%2FCA%3D%3D.%2FYKwEzJvnwngtvlAsiB%2B9MAz410Oy1CDOQN%2Fh91WtIzolpVNXGi5TXCxc5lHZpiqgtZlDyDn4fK%2Fw2neDQ0%2FbvWrAWqQl7tFusnDWZPRZjs%3D\" rel=\"nofollow\">\u52b2\u7206\uff01Java \u534f\u7a0b\u8981\u6765\u4e86\u3002\u3002\u3002<\/a><\/p>\n<p>3.<a href=\"https:\/\/link.segmentfault.com\/?enc=qoL4DR%2F90o1VSma1oGRRgA%3D%3D.wEgGeROT%2B%2BhqlM7dzdHkd5LCnA%2Byj86n8J380X%2B%2Fbp4c1Thml9YyhAzj%2BRnVh1eC\" rel=\"nofollow\">Spring Boot 2.x \u6559\u7a0b\uff0c\u592a\u5168\u4e86\uff01<\/a><\/p>\n<p>4.<a href=\"https:\/\/link.segmentfault.com\/?enc=fedH2bYUNNGRZwCDCbb0ug%3D%3D.SmmcV1FT34vsdMZ%2BevMoFibeuLblVhChi%2FKfccX4yP24hk21T8eEtBHfi8PfgppeoAcQyZE%2FFYEpJpMSvYukHFaDWxP8tx5g9Qd8y0cCy%2FY%3D\" rel=\"nofollow\">\u522b\u518d\u5199\u6ee1\u5c4f\u7684\u7206\u7206\u7206\u70b8\u7c7b\u4e86\uff0c\u8bd5\u8bd5\u88c5\u9970\u5668\u6a21\u5f0f\uff0c\u8fd9\u624d\u662f\u4f18\u96c5\u7684\u65b9\u5f0f\uff01\uff01<\/a><\/p>\n<p>5.<a href=\"https:\/\/link.segmentfault.com\/?enc=x%2FQ06rqgY1kmkqHzSfrTtw%3D%3D.%2FihQo67yJrs9sDj0aFiSgGshYebITod7A48ac5aqn81OvhvjNhmuPaLe6VrjSG5B8wvCVyAL1142QHJNoF5MRYa377A4DwrNml0H81ir89v%2FJNYBPD8sULmRT3TQ%2Bt9D\" rel=\"nofollow\">\u300aJava\u5f00\u53d1\u624b\u518c\uff08\u5d69\u5c71\u7248\uff09\u300b\u6700\u65b0\u53d1\u5e03\uff0c\u901f\u901f\u4e0b\u8f7d\uff01<\/a><\/p>\n<p>\u89c9\u5f97\u4e0d\u9519\uff0c\u522b\u5fd8\u4e86\u968f\u624b\u70b9\u8d5e+\u8f6c\u53d1\u54e6\uff01<\/p>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000042307373\">https:\/\/segmentfault.com\/a\/1190000042307373<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1 \u7b80\u4ecb \u5728\u7a0b\u5e8f\u4e2d\u5199\u65e5\u5fd7\u662f\u4e00\u4ef6\u975e\u5e38\u91cd\u8981\uff0c\u4f46\u662f\u5f88\u5bb9\u6613\u88ab\u5f00\u53d1\u4eba\u5458\u5ffd\u89c6\u7684\u5730\u65b9\u3002\u5199\u597d\u7a0b\u5e8f\u7684\u65e5\u5fd7\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u5927\u5927\u51cf\u8f7b\u540e\u671f [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-10006186","post","type-post","status-publish","format-standard","hentry"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10006186"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006186\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10006186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10006186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10006186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}