{"id":57,"date":"2022-03-03T12:22:10","date_gmt":"2022-03-03T04:22:10","guid":{"rendered":"http:\/\/www.hgostand.com\/?p=57"},"modified":"2022-03-23T15:29:20","modified_gmt":"2022-03-23T07:29:20","slug":"%e6%97%a5%e5%bf%97%e7%ae%a1%e7%90%86%e7%b3%bb%e7%bb%9f%ef%bc%8c%e5%a4%9a%e7%a7%8d%e6%96%b9%e5%bc%8f%e6%80%bb%e7%bb%93","status":"publish","type":"post","link":"https:\/\/wite.oxoooo.com\/?p=57","title":{"rendered":"\u65e5\u5fd7\u7ba1\u7406\u7cfb\u7edf\uff0c\u591a\u79cd\u65b9\u5f0f\u603b\u7ed3"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">\u4e00\u3001\u80cc\u666f\u7b80\u4ecb<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u9879\u76ee\u4e2d\u65e5\u5fd7\u7684\u7ba1\u7406\u662f\u57fa\u7840\u529f\u80fd\u4e4b\u4e00\uff0c\u4e0d\u540c\u7684\u7528\u6237\u548c\u573a\u666f\u4e0b\u5bf9\u65e5\u5fd7\u90fd\u6709\u7279\u5b9a\u7684\u9700\u6c42\uff0c\u4ece\u800c\u9700\u8981\u7528\u4e0d\u540c\u7684\u7b56\u7565\u8fdb\u884c\u65e5\u5fd7\u91c7\u96c6\u548c\u7ba1\u7406\uff0c\u5982\u679c\u662f\u5728\u5206\u5e03\u5f0f\u7684\u9879\u76ee\u4e2d\uff0c\u65e5\u5fd7\u7684\u4f53\u7cfb\u8bbe\u8ba1\u66f4\u52a0\u590d\u6742\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u65e5\u5fd7\u7c7b\u578b\uff1a\u4e1a\u52a1\u64cd\u4f5c\u3001\u4fe1\u606f\u6253\u5370\u3001\u8bf7\u6c42\u94fe\u8def\uff1b<\/li><li>\u89d2\u8272\u9700\u6c42\uff1a\u7814\u53d1\u7aef\u3001\u7528\u6237\u7aef\u3001\u670d\u52a1\u7ea7\u3001\u7cfb\u7edf\u7ea7\uff1b<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/static001.geekbang.org\/infoq\/97\/978fcb58e43f4a41c2d202be4d95e3c0.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u7528\u6237\u4e0e\u9700\u6c42<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u7528\u6237\u7aef\uff1a\u6838\u5fc3\u6570\u636e\u7684\u589e\u5220\u6539\uff0c\u4e1a\u52a1\u64cd\u4f5c\u65e5\u5fd7\uff1b<\/li><li>\u7814\u53d1\u7aef\uff1a\u65e5\u5fd7\u91c7\u96c6\u4e0e\u7ba1\u7406\u7b56\u7565\uff0c\u5f02\u5e38\u65e5\u5fd7\u76d1\u63a7\uff1b<\/li><li>\u670d\u52a1\u7ea7\uff1a\u5173\u952e\u65e5\u5fd7\u6253\u5370\uff0c\u95ee\u9898\u53d1\u73b0\u4e0e\u6392\u67e5\uff1b<\/li><li>\u7cfb\u7edf\u7ea7\uff1a\u5206\u5e03\u5f0f\u9879\u76ee\u4e2d\u94fe\u8def\u751f\u6210\uff0c\u76d1\u63a7\u4f53\u7cfb\uff1b<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0d\u540c\u7684\u573a\u666f\u4e2d\uff0c\u9700\u8981\u9009\u7528\u4e0d\u540c\u7684\u6280\u672f\u624b\u6bb5\u53bb\u5b9e\u73b0\u65e5\u5fd7\u91c7\u96c6\u7ba1\u7406\uff0c\u4f8b\u5982\u65e5\u5fd7\u6253\u5370\u3001\u64cd\u4f5c\u8bb0\u5f55\u3001ELK \u4f53\u7cfb\u7b49\uff0c\u6ce8\u610f\u8981\u907f\u514d\u65e5\u5fd7\u7ba1\u7406\u5bfc\u81f4\u7a0b\u5e8f\u5f02\u5e38\u4e2d\u65ad\u7684\u60c5\u51b5\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8d8a\u662f\u590d\u6742\u7684\u7cfb\u7edf\u8bbe\u8ba1\u548c\u4e1a\u52a1\u573a\u666f\uff0c\u5c31\u8d8a\u4f9d\u8d56\u65e5\u5fd7\u7684\u8f93\u51fa\u4fe1\u606f\uff0c\u5728\u5927\u89c4\u6a21\u7684\u67b6\u6784\u4e2d\uff0c\u901a\u5e38\u8fd8\u4f1a\u642d\u5efa\u72ec\u7acb\u7684\u65e5\u5fd7\u5e73\u53f0\uff0c\u63d0\u4f9b\u65e5\u5fd7\u6570\u636e\u7684\u91c7\u96c6\u3001\u5b58\u50a8\u3001\u5206\u6790\u7b49\u6574\u5957\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e8c\u3001Slf4j \u7ec4\u4ef6<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">1\u3001\u5916\u89c2\u6a21\u5f0f<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u65e5\u5fd7\u7684\u7ec4\u4ef6\u9075\u5b88\u5916\u89c2\u8bbe\u8ba1\u6a21\u5f0f\uff0cSlf4j \u4f5c\u4e3a\u65e5\u5fd7\u4f53\u7cfb\u7684\u5916\u89c2\u5bf9\u8c61\uff0c\u5b9a\u4e49\u89c4\u8303\u65e5\u5fd7\u7684\u6807\u51c6\uff0c\u65e5\u5fd7\u80fd\u529b\u7684\u5177\u4f53\u5b9e\u73b0\u4ea4\u7531\u5404\u4e2a\u5b50\u6a21\u5757\u53bb\u5b9e\u73b0\uff1bSlf4j \u660e\u786e\u65e5\u5fd7\u5bf9\u8c61\u7684\u52a0\u8f7d\u65b9\u6cd5\u548c\u529f\u80fd\u63a5\u53e3\uff0c\u4e0e\u5ba2\u6237\u7aef\u4ea4\u4e92\u63d0\u4f9b\u65e5\u5fd7\u7ba1\u7406\u529f\u80fd\uff1b<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/static001.geekbang.org\/infoq\/23\/2328600cb2c6e943ec00d61a70c7aed9.png\" alt=\"\"\/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(Impl.class) ;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u590d\u5236\u4ee3\u7801<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u5e38\u7981\u6b62\u76f4\u63a5\u4f7f\u7528 Logback\u3001Log4j \u7b49\u5177\u4f53\u5b9e\u73b0\u7ec4\u4ef6\u7684 API\uff0c\u907f\u514d\u7ec4\u4ef6\u66ff\u6362\u5e26\u6765\u4e0d\u5fc5\u8981\u7684\u9ebb\u70e6\uff0c\u53ef\u4ee5\u505a\u5230\u65e5\u5fd7\u7684\u7edf\u4e00\u7ef4\u62a4\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2\u3001SPI \u63a5\u53e3<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ece Slf4j \u548c Logback \u7ec4\u4ef6\u4ea4\u4e92\u6765\u770b\uff0c\u5728\u65e5\u5fd7\u7684\u4f7f\u7528\u8fc7\u7a0b\u4e2d\uff0c\u57fa\u672c\u7684\u5207\u5165\u70b9\u5373\u4f7f\u7528 Slf4j \u7684\u63a5\u53e3\uff0c\u8bc6\u522b\u5e76\u52a0\u8f7d Logback \u4e2d\u7684\u5177\u4f53\u5b9e\u73b0\uff1bSPI \u5b9a\u4e49\u7684\u63a5\u53e3\u89c4\u8303\uff0c\u901a\u5e38\u4f5c\u4e3a\u7b2c\u4e09\u65b9\uff08\u5916\u90e8\uff09\u7ec4\u4ef6\u7684\u5b9e\u73b0\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/static001.geekbang.org\/infoq\/81\/8150eb821ee8e5ad4944a0ff6fe7b36b.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0a\u8ff0 SPI \u4f5c\u4e3a\u4e24\u5957\u7ec4\u4ef6\u7684\u8fde\u63a5\u70b9\uff0c\u901a\u8fc7\u6e90\u7801\u5927\u81f4\u770b\u4e0b\u52a0\u8f7d\u8fc7\u7a0b\uff0c\u8ffd\u6eaf LoggerFactory \u7684\u6e90\u7801\u5373\u53ef\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>public final class org.slf4j.LoggerFactory {<\/code><code>    private final static void performInitialization() {<\/code><code>        bind();<\/code><code>    }<\/code><code>    private final static void bind() {<\/code><code>        try {<\/code><code>            StaticLoggerBinder.getSingleton();<\/code><code>        } catch (NoClassDefFoundError ncde) {<\/code><code>            String msg = ncde.getMessage();<\/code><code>            if (messageContainsOrgSlf4jImplStaticLoggerBinder(msg)) {<\/code><code>                Util.report(\"Failed to load class \\\"org.slf4j.impl.StaticLoggerBinder\\\".\");<\/code><code>            }<\/code><code>        }<\/code><code>    }<\/code><code>}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u590d\u5236\u4ee3\u7801<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b64\u5904\u53ea\u8d34\u51fa\u4e86\u51e0\u884c\u793a\u610f\u6027\u8d28\u7684\u6e90\u7801\uff0c\u5728 LoggerFactory \u4e2d\u6267\u884c\u521d\u59cb\u5316\u7ed1\u5b9a\u5173\u8054\u7684\u65f6\u5019\uff0c\u5982\u679c\u6ca1\u6709\u627e\u5230\u5177\u4f53\u7684\u65e5\u5fd7\u5b9e\u73b0\u7ec4\u4ef6\uff0c\u662f\u4f1a\u62a5\u544a\u51fa\u76f8\u5e94\u7684\u5f02\u5e38\u4fe1\u606f\uff0c\u5e76\u4e14\u91c7\u7528\u7684\u662f System.err \u8f93\u51fa\u9519\u8bef\u63d0\u793a\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e09\u3001\u81ea\u5b9a\u4e49\u7ec4\u4ef6<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">1\u3001\u529f\u80fd\u5c01\u88c5<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5bf9\u4e8e\u65e5\u5fd7\uff08\u6216\u5176\u4ed6\uff09\u5e38\u7528\u529f\u80fd\uff0c\u901a\u5e38\u4f1a\u5728\u4ee3\u7801\u5de5\u7a0b\u4e2d\u5c01\u88c5\u72ec\u7acb\u7684\u4ee3\u7801\u5305\uff0c\u4f5c\u4e3a\u516c\u5171\u4f9d\u8d56\uff0c\u7edf\u4e00\u7ba1\u7406\u548c\u7ef4\u62a4\uff0c\u5bf9\u4e8e\u65e5\u5fd7\u7684\u81ea\u5b9a\u4e49\u5c01\u88c5\u53ef\u4ee5\u53c2\u8003\u4e4b\u524d\u7684\u6587\u6863\uff0c\u8fd9\u91cc\u901a\u5e38\u6d89\u53ca\u51e0\u4e2a\u6838\u5fc3\u70b9\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>starter \u52a0\u8f7d\uff1a\u5c01\u88c5\u5305\u914d\u7f6e\u6210 starter \u7ec4\u4ef6\uff0c\u53ef\u4ee5\u88ab\u6846\u67b6\u626b\u63cf\u548c\u52a0\u8f7d\uff1b<\/li><li>aop \u5207\u9762\u7f16\u7a0b\uff1a\u901a\u5e38\u5728\u76f8\u5173\u65b9\u6cd5\u4e0a\u6dfb\u52a0\u65e5\u5fd7\u6ce8\u89e3\uff0c\u5373\u53ef\u81ea\u52a8\u8bb0\u5f55\u52a8\u4f5c\uff1b<\/li><li>annotation \u6ce8\u89e3\uff1a\u5b9a\u4e49\u65e5\u5fd7\u8bb0\u5f55\u9700\u8981\u6807\u8bb0\u7684\u6838\u5fc3\u53c2\u6570\u548c\u5904\u7406\u903b\u8f91\uff1b<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u81f3\u4e8e\u5982\u4f55\u7ec4\u88c5\u65e5\u5fd7\u5185\u5bb9\uff0c\u9002\u914d\u4e1a\u52a1\u8bed\u4e49\uff0c\u4ee5\u53ca\u540e\u7eed\u7684\u7ba1\u7406\u6d41\u7a0b\uff0c\u5219\u6839\u636e\u5177\u4f53\u573a\u666f\u8bbe\u8ba1\u76f8\u5e94\u7684\u7b56\u7565\u5373\u53ef\uff0c\u6bd4\u5982\u65e5\u5fd7\u600e\u4e48\u5b58\u50a8\u3001\u662f\u5426\u5b9e\u65f6\u5206\u6790\u3001\u662f\u5426\u5f02\u6b65\u6267\u884c\u7b49\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2\u3001\u5bf9\u8c61\u89e3\u6790<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u81ea\u5b9a\u4e49\u6ce8\u89e3\u4e2d\uff0c\u4f1a\u6d89\u53ca\u5230\u5bf9\u8c61\u89e3\u6790\u7684\u95ee\u9898\uff0c\u5373\u5728\u6ce8\u89e3\u4e2d\u653e\u5165\u8981\u4ece\u5bf9\u8c61\u4e2d\u89e3\u6790\u7684\u5c5e\u6027\uff0c\u5e76\u4e14\u628a\u503c\u62fc\u63a5\u5230\u65e5\u5fd7\u5185\u5bb9\u4e2d\uff0c\u53ef\u4ee5\u589e\u5f3a\u4e1a\u52a1\u65e5\u5fd7\u7684\u8bed\u4e49\u53ef\u8bfb\u6027\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>import org.springframework.expression.Expression;<\/code><code>import org.springframework.expression.spel.standard.SpelExpressionParser;<\/code><code>public class Test {<\/code><code>    public static void main(String[] args) {<\/code><code>        \/\/ Map\u96c6\u5408<\/code><code>        HashMap&lt;String,Object&gt; infoMap = new HashMap&lt;&gt;() ;<\/code><code>        infoMap.put(\"info\",\"Map\u7684\u63cf\u8ff0\") ;<\/code><code>        \/\/ List\u96c6\u5408<\/code><code>        ArrayList&lt;Object&gt; arrayList = new ArrayList&lt;&gt;() ;<\/code><code>        arrayList.add(\"List-00\");<\/code><code>        arrayList.add(\"List-01\");<\/code><code>        \/\/ User\u5bf9\u8c61<\/code><code>        People oldUser = new People(\"Wang\",infoMap,arrayList) ;<\/code><code>        People newUser = new People(\"LiSi\",infoMap,arrayList) ;<\/code><code>        \/\/ \u5305\u88c5\u5bf9\u8c61<\/code><code>        WrapObj wrapObj = new WrapObj(\"WrapObject\",oldUser,newUser) ;<\/code><code>        \/\/ \u5bf9\u8c61\u5c5e\u6027\u89e3\u6790<\/code><code>        SpelExpressionParser parser = new SpelExpressionParser();<\/code><code>        \/\/ objName<\/code><code>        Expression objNameExp = parser.parseExpression(\"#root.objName\");<\/code><code>        System.out.println(objNameExp.getValue(wrapObj));<\/code><code>        \/\/ oldUser<\/code><code>        Expression oldUserExp = parser.parseExpression(\"#root.oldUser\");<\/code><code>        System.out.println(oldUserExp.getValue(wrapObj));<\/code><code>        \/\/ newUser.userName<\/code><code>        Expression userNameExp = parser.parseExpression(\"#root.newUser.userName\");<\/code><code>        System.out.println(userNameExp.getValue(wrapObj));<\/code><code>        \/\/ newUser.hashMap[info]<\/code><code>        Expression ageMapExp = parser.parseExpression(\"#root.newUser.hashMap[info]\");<\/code><code>        System.out.println(ageMapExp.getValue(wrapObj));<\/code><code>        \/\/ oldUser.arrayList[1]<\/code><code>        Expression arr02Exp = parser.parseExpression(\"#root.oldUser.arrayList[1]\");<\/code><code>        System.out.println(arr02Exp.getValue(wrapObj));<\/code><code>    }<\/code><code>}<\/code><code>@Data<\/code><code>@AllArgsConstructor<\/code><code>class WrapObj {<\/code><code>    private String objName ;<\/code><code>    private People oldUser ;<\/code><code>    private People newUser ;<\/code><code>}<\/code><code>@Data<\/code><code>@AllArgsConstructor<\/code><code>class People {<\/code><code>    private String userName ;<\/code><code>    private HashMap&lt;String,Object&gt; hashMap ;<\/code><code>    private ArrayList&lt;Object&gt; arrayList ;<\/code><code>}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u590d\u5236\u4ee3\u7801<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6ce8\u610f\u4e0a\u9762\u4f7f\u7528\u7684<code>SpelExpressionParser<\/code>\u89e3\u6790\u5668\uff0c\u5373 Spring \u6846\u67b6\u7684\u539f\u751f API\uff1b\u4e1a\u52a1\u4e2d\u9047\u5230\u7684\u5f88\u591a\u95ee\u9898\uff0c\u5efa\u8bae\u90fd\u4f18\u5148\u4ece\u6838\u5fc3\u4f9d\u8d56(Spring+JDK)\u4e2d\u5bfb\u627e\u89e3\u51b3\u65b9\u5f0f\uff0c\u591a\u82b1\u65f6\u95f4\u719f\u6089\u7cfb\u7edf\u4e2d\u6838\u5fc3\u7ec4\u4ef6\u7684\u5168\u8c8c\uff0c\u5bf9\u5f00\u53d1\u89c6\u91ce\u548c\u601d\u8def\u4f1a\u6709\u6781\u5927\u7684\u5e2e\u52a9\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3\u3001\u6a21\u5f0f\u8bbe\u8ba1<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u91cc\u770b\u4e00\u4e2a\u6bd4\u8f83\u590d\u6742\u7684\u81ea\u5b9a\u4e49\u65e5\u5fd7\u89e3\u51b3\u601d\u8def\uff0c\u901a\u8fc7 AOP \u6a21\u5f0f\u8bc6\u522b\u65e5\u5fd7\u6ce8\u89e3\uff0c\u5e76\u89e3\u6790\u6ce8\u89e3\u4e2d\u8981\u8bb0\u5f55\u7684\u5bf9\u8c61\u5c5e\u6027\uff0c\u6784\u5efa\u76f8\u5e94\u7684\u65e5\u5fd7\u4e3b\u4f53\uff0c\u6700\u540e\u6839\u636e\u6ce8\u89e3\u6807\u8bb0\u7684\u573a\u666f\u53bb\u9002\u914d\u4e0d\u540c\u7684\u4e1a\u52a1\u7b56\u7565\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/static001.geekbang.org\/infoq\/26\/26bf5b9178de6deba03935c52a2a51eb.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u5bf9\u4e8e\u529f\u80fd\u7684\u901a\u7528\u6027\u8981\u6c42\u8d8a\u9ad8\uff0c\u5728\u5c01\u88c5\u65f6\u5185\u7f6e\u7684\u9002\u914d\u7b56\u7565\u5c31\u8981\u8d8a\u62bd\u8c61\uff0c\u5728\u5904\u7406\u590d\u6742\u7684\u903b\u8f91\u6d41\u7a0b\u65f6\uff0c\u8981\u5584\u4e8e\u5c06\u4e0d\u540c\u7684\u7ec4\u4ef6\u642d\u914d\u4f7f\u7528\uff0c\u53ef\u4ee5\u5206\u62c5\u4e1a\u52a1\u652f\u6491\u7684\u538b\u529b\uff0c\u5f62\u6210\u7a33\u5b9a\u53ef\u9760\u7684\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u56db\u3001\u5206\u5e03\u5f0f\u94fe\u8def<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">1\u3001\u94fe\u8def\u8bc6\u522b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u57fa\u4e8e\u5fae\u670d\u52a1\u5b9e\u73b0\u7684\u5206\u5e03\u5f0f\u7cfb\u7edf\uff0c\u5904\u7406\u4e00\u4e2a\u8bf7\u6c42\u4f1a\u7ecf\u8fc7\u591a\u4e2a\u5b50\u670d\u52a1\uff0c\u5982\u679c\u8fc7\u7a0b\u4e2d\u67d0\u4e2a\u670d\u52a1\u53d1\u751f\u5f02\u5e38\uff0c\u9700\u8981\u5b9a\u4f4d\u8fd9\u4e2a\u5f02\u5e38\u5f52\u5c5e\u7684\u8bf7\u6c42\u52a8\u4f5c\uff0c\u4ece\u800c\u66f4\u597d\u7684\u53bb\u5224\u65ad\u5f02\u5e38\u539f\u56e0\u5e76\u590d\u73b0\u89e3\u51b3\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9a\u4f4d\u7684\u52a8\u4f5c\u5219\u4f9d\u8d56\u4e00\u4e2a\u6838\u5fc3\u7684\u6807\u8bc6\uff1aTraceId-\u8f68\u8ff9 ID\uff0c\u5373\u8bf7\u6c42\u5728\u5404\u4e2a\u670d\u52a1\u6d41\u8f6c\u65f6\uff0c\u4f1a\u643a\u5e26\u8be5\u8bf7\u6c42\u7ed1\u5b9a\u7684 TraceId\uff0c\u8fd9\u6837\u53ef\u4ee5\u8bc6\u522b\u4e0d\u540c\u670d\u52a1\u7684\u54ea\u4e9b\u52a8\u4f5c\u4e3a\u540c\u4e00\u4e2a\u8bf7\u6c42\u4ea7\u751f\u7684\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/static001.geekbang.org\/infoq\/30\/300f21377c7870d70a6aa3f55049a319.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7 TraceId \u548c SpanId \u5373\u53ef\u8fd8\u539f\u51fa\u8bf7\u6c42\u7684\u94fe\u8def\u89c6\u56fe\uff0c\u518d\u7ed3\u5408\u76f8\u5173\u65e5\u5fd7\u6253\u5370\u8bb0\u5f55\u7b49\u52a8\u4f5c\uff0c\u5219\u53ef\u4ee5\u5feb\u901f\u89e3\u51b3\u5f02\u5e38\u95ee\u9898\u3002\u5728\u5fae\u670d\u52a1\u4f53\u7cfb\u4e2d Sleuth \u7ec4\u4ef6\u63d0\u4f9b\u4e86\u8be5\u80fd\u529b\u7684\u652f\u6491\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u94fe\u8def\u89c6\u56fe\u7684\u6838\u5fc3\u53c2\u6570\u53ef\u4ee5\u96c6\u6210 Slf4j \u7ec4\u4ef6\u4e2d\uff0c\u8fd9\u91cc\u53ef\u4ee5\u53c2\u8003<code>org.slf4j.MDC<\/code>\u8bed\u6cd5\uff0cMDC \u63d0\u4f9b\u65e5\u5fd7\u524d\u540e\u7684\u53c2\u6570\u4f20\u9012\u6620\u5c04\u80fd\u529b\uff0c\u5185\u90e8\u5305\u88c5 Map \u5bb9\u5668\u7ba1\u7406\u53c2\u6570\uff1b\u5728 Logback \u7ec4\u4ef6\u4e2d\uff0c<code>StaticMDCBinder<\/code>\u63d0\u4f9b\u8be5\u80fd\u529b\u7684\u7ed1\u5b9a\uff0c\u8fd9\u6837\u65e5\u5fd7\u6253\u5370\u4e5f\u53ef\u4ee5\u643a\u5e26\u94fe\u8def\u89c6\u56fe\u7684\u6807\u8bc6\uff0c\u505a\u5230\u8be5\u80fd\u529b\u7684\u5b8c\u6574\u96c6\u6210\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2\u3001ELK \u4f53\u7cfb<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u94fe\u8def\u89c6\u56fe\u4ea7\u751f\u7684\u65e5\u5fd7\u662f\u975e\u5e38\u5e9e\u5927\u7684\uff0c\u90a3\u8fd9\u4e9b\u6587\u6863\u7c7b\u7684\u65e5\u5fd7\u5982\u4f55\u7ba1\u7406\u548c\u5feb\u901f\u67e5\u8be2\u4f7f\u7528\u540c\u6837\u662f\u4e2a\u5173\u952e\u95ee\u9898\uff0c\u5f88\u5e38\u89c1\u7684\u4e00\u4e2a\u89e3\u51b3\u65b9\u6848\u5373 ELK \u4f53\u7cfb\uff0c\u73b0\u5728\u5df2\u66f4\u65b0\u6362\u4ee3\u4e3a ElasticStack \u4ea7\u54c1\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/static001.geekbang.org\/infoq\/b6\/b6126792f246a0377ace05204c072450.png\" alt=\"\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>Kibana\uff1a\u53ef\u4ee5\u5728 Elasticsearch \u4e2d\u4f7f\u7528\u56fe\u5f62\u548c\u56fe\u8868\u5bf9\u6570\u636e\u8fdb\u884c\u53ef\u89c6\u5316\uff1b<\/li><li>Elasticsearch\uff1a\u63d0\u4f9b\u6570\u636e\u7684\u5b58\u50a8\uff0c\u641c\u7d22\u548c\u5206\u6790\u5f15\u64ce\u7684\u80fd\u529b\uff1b<\/li><li>Logstash\uff1a\u6570\u636e\u5904\u7406\u7ba1\u9053\uff0c\u80fd\u591f\u540c\u65f6\u4ece\u591a\u4e2a\u6765\u6e90\u91c7\u96c6\u3001\u8f6c\u6362\u3001\u63a8\u9001\u6570\u636e\uff1b<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Logstash \u63d0\u4f9b\u65e5\u5fd7\u91c7\u96c6\u548c\u4f20\u8f93\u80fd\u529b\uff0cElasticsearch \u5b58\u50a8\u5927\u91cf JSON \u683c\u5f0f\u7684\u65e5\u5fd7\u8bb0\u5f55\uff0cKibana \u5219\u53ef\u4ee5\u89c6\u56fe\u5316\u5c55\u73b0\u6570\u636e\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3\u3001\u670d\u52a1\u4e0e\u914d\u7f6e<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u914d\u7f6e\u4f9d\u8d56<\/strong>\uff1a\u9700\u8981\u5728\u670d\u52a1\u4e2d\u914d\u7f6e Logstash \u5730\u5740\u548c\u7aef\u53e3\uff0c\u5373\u65e5\u5fd7\u4f20\u8f93\u5730\u5740\uff0c\u4ee5\u53ca\u670d\u52a1\u540d\u79f0\uff1b<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>spring:<\/code><code>  application:<\/code><code>    name: app_serve<\/code><code>logstash:<\/code><code>  destination: <\/code><code>    uri: Logstash-\u5730\u5740<\/code><code>    port: Logstash-\u7aef\u53e3<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u590d\u5236\u4ee3\u7801<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u914d\u7f6e\u8bfb\u53d6<\/strong>\uff1aLogback \u7ec4\u4ef6\u914d\u7f6e\u4e2d\u52a0\u8f7d\u4e0a\u8ff0\u6838\u5fc3\u53c2\u6570\uff0c\u8fd9\u6837\u5728\u914d\u7f6e\u4e0a\u4e0b\u6587\u4e2d\u53ef\u4ee5\u901a\u8fc7 name \u7684\u503c\u4f7f\u7528\u8be5\u53c2\u6570\uff1b<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>&lt;springProperty scope=\"context\" name=\"APP_NAME\" source=\"spring.application.name\" defaultValue=\"butte_app\" \/&gt;<\/code><code>&lt;springProperty scope=\"context\" name=\"DES_URI\" source=\"logstash.destination.uri\" \/&gt;<\/code><code>&lt;springProperty scope=\"context\" name=\"DES_PORT\" source=\"logstash.destination.port\" \/&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u590d\u5236\u4ee3\u7801<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u65e5\u5fd7\u4f20\u8f93<\/strong>\uff1a\u5bf9\u4f20\u8f93\u5185\u5bb9\u505a\u76f8\u5e94\u7684\u914d\u7f6e\uff0c\u6307\u5b9a LogStash \u670d\u52a1\u914d\u7f6e\uff0c\u7f16\u7801\uff0c\u6838\u5fc3\u53c2\u6570\u7b49\uff1b<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>&lt;appender name=\"LogStash\" class=\"net.logstash.logback.appender.LogstashTcpSocketAppender\"&gt;<\/code><code>    &lt;!-- \u65e5\u5fd7\u4f20\u8f93\u5730\u5740 --&gt;<\/code><code>    &lt;destination&gt;${DES_URI:- }:${DES_PORT:- }&lt;\/destination&gt;<\/code><code>    &lt;!-- \u65e5\u5fd7\u4f20\u8f93\u7f16\u7801 --&gt;<\/code><code>    &lt;encoder class=\"net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder\"&gt;<\/code><code>        &lt;providers&gt;<\/code><code>            &lt;timestamp&gt;<\/code><code>                &lt;timeZone&gt;UTC&lt;\/timeZone&gt;<\/code><code>            &lt;\/timestamp&gt;<\/code><code>            &lt;!-- \u65e5\u5fd7\u4f20\u8f93\u53c2\u6570 --&gt;<\/code><code>            &lt;pattern&gt;<\/code><code>                &lt;pattern&gt;<\/code><code>                    {<\/code><code>                    \"severity\": \"%level\",<\/code><code>                    \"service\": \"${APP_NAME:-}\",<\/code><code>                    \"trace\": \"%X{X-B3-TraceId:-}\",<\/code><code>                    \"span\": \"%X{X-B3-SpanId:-}\",<\/code><code>                    \"exportable\": \"%X{X-Span-Export:-}\",<\/code><code>                    \"pid\": \"${PID:-}\",<\/code><code>                    \"thread\": \"%thread\",<\/code><code>                    \"class\": \"%logger{40}\",<\/code><code>                    \"rest\": \"%message\"<\/code><code>                    }<\/code><code>                &lt;\/pattern&gt;<\/code><code>            &lt;\/pattern&gt;<\/code><code>        &lt;\/providers&gt;<\/code><code>    &lt;\/encoder&gt;<\/code><code>&lt;\/appender&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u590d\u5236\u4ee3\u7801<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u8f93\u51fa\u683c\u5f0f<\/strong>\uff1a\u8fd8\u53ef\u4ee5\u901a\u8fc7\u65e5\u5fd7\u7684\u683c\u5f0f\u8bbe\u5b9a\uff0c\u7ba1\u7406\u65e5\u5fd7\u6587\u4ef6\u6216\u8005\u63a7\u5236\u53f0\u7684\u8f93\u51fa\u5185\u5bb9\uff1b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;pattern&gt;%d{yyyy-MM-dd HH:mm:ss} %contextName &#91;%thread] %-5level %logger{100} - %msg %n&lt;\/pattern&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u590d\u5236\u4ee3\u7801<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5173\u4e8e Logback \u7ec4\u4ef6\u65e5\u5fd7\u7684\u5176\u4ed6\u914d\u7f6e\uff0c\u4f8b\u5982\u8f93\u51fa\u4f4d\u7f6e\uff0c\u7ea7\u522b\uff0c\u6570\u636e\u4f20\u8f93\u65b9\u5f0f\u7b49\uff0c\u53ef\u4ee5\u591a\u53c2\u8003\u5b98\u65b9\u6587\u6863\uff0c\u4e0d\u65ad\u4f18\u5316\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4\u3001\u6570\u636e\u901a\u9053<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u518d\u770b\u770b\u6570\u636e\u4f20\u8f93\u5230 Logstash \u670d\u52a1\u540e\uff0c\u5982\u4f55\u518d\u4f20\u8f93\u5230 ES \u7684\uff0c\u8fd9\u91cc\u4e5f\u9700\u8981\u76f8\u5e94\u7684\u4f20\u8f93\u914d\u7f6e\uff0c\u6ce8\u610f logstash \u548c ES \u63a8\u8350\u4f7f\u7528\u76f8\u540c\u7684\u7248\u672c\uff0c\u672c\u6848\u4f8b\u4e2d\u662f<code>6.8.6<\/code>\u7248\u672c\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/static001.geekbang.org\/infoq\/48\/489d247c168cf5aaf3491fb7ef0bce13.png\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u914d\u7f6e\u6587\u4ef6\uff1a<strong>logstash-butte.conf<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>input {<\/code><code>  tcp {<\/code><code>    host =&gt; \"192.168.37.139\"<\/code><code>    port =&gt; \"5044\"<\/code><code>    codec =&gt; \"json\"<\/code><code>  }<\/code><code>}<\/code><code><br><\/code><code>output {<\/code><code>  elasticsearch {<\/code><code>    hosts =&gt; [\"http:\/\/localhost:9200\"]<\/code><code>    index =&gt; \"log-%{+YYYY.MM.dd}\"<\/code><code>  }<\/code><code>}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u590d\u5236\u4ee3\u7801<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u8f93\u5165\u914d\u7f6e\uff1a\u6307\u5b9a logstash \u8fde\u63a5\u7684 host \u548c\u7aef\u53e3\uff0c\u5e76\u4e14\u6307\u5b9a\u6570\u636e\u683c\u5f0f\u4e3a json \u7c7b\u578b\uff1b<\/li><li>\u8f93\u51fa\u914d\u7f6e\uff1a\u6307\u5b9a\u65e5\u5fd7\u6570\u636e\u8f93\u51fa\u7684 ES \u5730\u5740\uff0c\u5e76\u6307\u5b9a index \u7d22\u5f15\u6309\u5929\u7684\u521b\u5efa\u65b9\u5f0f\uff1b<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u542f\u52a8 logstash \u670d\u52a1<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/opt\/logstash-6.8.6\/bin\/logstash -f \/opt\/logstash-6.8.6\/config\/logstash-butte.conf<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u590d\u5236\u4ee3\u7801<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u6837\u5b8c\u6574\u7684 ELK \u65e5\u5fd7\u7ba1\u7406\u94fe\u8def\u5c31\u5b9e\u73b0\u4e86\uff0c\u901a\u8fc7\u4f7f\u7528 Kibana \u5de5\u5177\u5c31\u53ef\u4ee5\u67e5\u770b\u65e5\u5fd7\u8bb0\u5f55\uff0c\u6839\u636e TraceId \u5c31\u53ef\u4ee5\u627e\u5230\u89c6\u56fe\u94fe\u8def\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u4e94\u3001\u53c2\u8003\u6e90\u7801<\/h1>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>\u5e94\u7528\u4ed3\u5e93\uff1a<\/code><code>https:\/\/gitee.com\/cicadasmile\/butte-flyer-parent<\/code><code><br><\/code><code>\u7ec4\u4ef6\u5c01\u88c5\uff1a<\/code><code>https:\/\/gitee.com\/cicadasmile\/butte-frame-parent<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u590d\u5236\u4ee3\u7801<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9879\u76ee\u4e2d\u65e5\u5fd7\u7684\u7ba1\u7406\u662f\u57fa\u7840\u529f\u80fd\u4e4b\u4e00\uff0c\u4e0d\u540c\u7684\u7528\u6237\u548c\u573a\u666f\u4e0b\u5bf9\u65e5\u5fd7\u90fd\u6709\u7279\u5b9a\u7684\u9700\u6c42\uff0c\u4ece\u800c\u9700\u8981\u7528\u4e0d\u540c\u7684\u7b56\u7565\u8fdb\u884c\u65e5\u5fd7\u91c7\u96c6\u548c\u7ba1\u7406\uff0c\u5982\u679c\u662f\u5728\u5206\u5e03\u5f0f\u7684\u9879\u76ee\u4e2d\uff0c\u65e5\u5fd7\u7684\u4f53\u7cfb\u8bbe\u8ba1\u66f4\u52a0\u590d\u6742\u3002<\/p>\n","protected":false},"author":2,"featured_media":11,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-57","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technews","col-md-12"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u65e5\u5fd7\u7ba1\u7406\u7cfb\u7edf\uff0c\u591a\u79cd\u65b9\u5f0f\u603b\u7ed3 - WITE<\/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:\/\/wite.oxoooo.com\/?p=57\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u65e5\u5fd7\u7ba1\u7406\u7cfb\u7edf\uff0c\u591a\u79cd\u65b9\u5f0f\u603b\u7ed3 - WITE\" \/>\n<meta property=\"og:description\" content=\"\u9879\u76ee\u4e2d\u65e5\u5fd7\u7684\u7ba1\u7406\u662f\u57fa\u7840\u529f\u80fd\u4e4b\u4e00\uff0c\u4e0d\u540c\u7684\u7528\u6237\u548c\u573a\u666f\u4e0b\u5bf9\u65e5\u5fd7\u90fd\u6709\u7279\u5b9a\u7684\u9700\u6c42\uff0c\u4ece\u800c\u9700\u8981\u7528\u4e0d\u540c\u7684\u7b56\u7565\u8fdb\u884c\u65e5\u5fd7\u91c7\u96c6\u548c\u7ba1\u7406\uff0c\u5982\u679c\u662f\u5728\u5206\u5e03\u5f0f\u7684\u9879\u76ee\u4e2d\uff0c\u65e5\u5fd7\u7684\u4f53\u7cfb\u8bbe\u8ba1\u66f4\u52a0\u590d\u6742\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wite.oxoooo.com\/?p=57\" \/>\n<meta property=\"og:site_name\" content=\"WITE\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-03T04:22:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-23T07:29:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wite.oxoooo.com\/wp-content\/uploads\/2021\/09\/pexels-alleksana-4185957.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"853\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"hgostand\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"hgostand\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wite.oxoooo.com\\\/?p=57#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wite.oxoooo.com\\\/?p=57\"},\"author\":{\"name\":\"hgostand\",\"@id\":\"https:\\\/\\\/wite.oxoooo.com\\\/#\\\/schema\\\/person\\\/00c6377b90c41a8d0789bd572010a7ea\"},\"headline\":\"\u65e5\u5fd7\u7ba1\u7406\u7cfb\u7edf\uff0c\u591a\u79cd\u65b9\u5f0f\u603b\u7ed3\",\"datePublished\":\"2022-03-03T04:22:10+00:00\",\"dateModified\":\"2022-03-23T07:29:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wite.oxoooo.com\\\/?p=57\"},\"wordCount\":75,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/wite.oxoooo.com\\\/#\\\/schema\\\/person\\\/00c6377b90c41a8d0789bd572010a7ea\"},\"image\":{\"@id\":\"https:\\\/\\\/wite.oxoooo.com\\\/?p=57#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wite.oxoooo.com\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/pexels-alleksana-4185957.jpg\",\"articleSection\":[\"\u65f6\u523b\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wite.oxoooo.com\\\/?p=57#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wite.oxoooo.com\\\/?p=57\",\"url\":\"https:\\\/\\\/wite.oxoooo.com\\\/?p=57\",\"name\":\"\u65e5\u5fd7\u7ba1\u7406\u7cfb\u7edf\uff0c\u591a\u79cd\u65b9\u5f0f\u603b\u7ed3 - WITE\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wite.oxoooo.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/wite.oxoooo.com\\\/?p=57#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/wite.oxoooo.com\\\/?p=57#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wite.oxoooo.com\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/pexels-alleksana-4185957.jpg\",\"datePublished\":\"2022-03-03T04:22:10+00:00\",\"dateModified\":\"2022-03-23T07:29:20+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wite.oxoooo.com\\\/?p=57#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wite.oxoooo.com\\\/?p=57\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/wite.oxoooo.com\\\/?p=57#primaryimage\",\"url\":\"https:\\\/\\\/wite.oxoooo.com\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/pexels-alleksana-4185957.jpg\",\"contentUrl\":\"https:\\\/\\\/wite.oxoooo.com\\\/wp-content\\\/uploads\\\/2021\\\/09\\\/pexels-alleksana-4185957.jpg\",\"width\":1280,\"height\":853},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wite.oxoooo.com\\\/?p=57#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\\\/\\\/wite.oxoooo.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u65e5\u5fd7\u7ba1\u7406\u7cfb\u7edf\uff0c\u591a\u79cd\u65b9\u5f0f\u603b\u7ed3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wite.oxoooo.com\\\/#website\",\"url\":\"https:\\\/\\\/wite.oxoooo.com\\\/\",\"name\":\"WITE\",\"description\":\"\u805a\u7126\u6280\u672f\u9886\u57df\u521b\u65b0\",\"publisher\":{\"@id\":\"https:\\\/\\\/wite.oxoooo.com\\\/#\\\/schema\\\/person\\\/00c6377b90c41a8d0789bd572010a7ea\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wite.oxoooo.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/wite.oxoooo.com\\\/#\\\/schema\\\/person\\\/00c6377b90c41a8d0789bd572010a7ea\",\"name\":\"hgostand\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/www.hgostand.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/\u8d44\u6e90-4@4x.png\",\"url\":\"https:\\\/\\\/www.hgostand.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/\u8d44\u6e90-4@4x.png\",\"contentUrl\":\"https:\\\/\\\/www.hgostand.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/\u8d44\u6e90-4@4x.png\",\"width\":824,\"height\":618,\"caption\":\"hgostand\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.hgostand.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/\u8d44\u6e90-4@4x.png\"},\"url\":\"https:\\\/\\\/wite.oxoooo.com\\\/?author=2\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u65e5\u5fd7\u7ba1\u7406\u7cfb\u7edf\uff0c\u591a\u79cd\u65b9\u5f0f\u603b\u7ed3 - WITE","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:\/\/wite.oxoooo.com\/?p=57","og_locale":"zh_CN","og_type":"article","og_title":"\u65e5\u5fd7\u7ba1\u7406\u7cfb\u7edf\uff0c\u591a\u79cd\u65b9\u5f0f\u603b\u7ed3 - WITE","og_description":"\u9879\u76ee\u4e2d\u65e5\u5fd7\u7684\u7ba1\u7406\u662f\u57fa\u7840\u529f\u80fd\u4e4b\u4e00\uff0c\u4e0d\u540c\u7684\u7528\u6237\u548c\u573a\u666f\u4e0b\u5bf9\u65e5\u5fd7\u90fd\u6709\u7279\u5b9a\u7684\u9700\u6c42\uff0c\u4ece\u800c\u9700\u8981\u7528\u4e0d\u540c\u7684\u7b56\u7565\u8fdb\u884c\u65e5\u5fd7\u91c7\u96c6\u548c\u7ba1\u7406\uff0c\u5982\u679c\u662f\u5728\u5206\u5e03\u5f0f\u7684\u9879\u76ee\u4e2d\uff0c\u65e5\u5fd7\u7684\u4f53\u7cfb\u8bbe\u8ba1\u66f4\u52a0\u590d\u6742\u3002","og_url":"https:\/\/wite.oxoooo.com\/?p=57","og_site_name":"WITE","article_published_time":"2022-03-03T04:22:10+00:00","article_modified_time":"2022-03-23T07:29:20+00:00","og_image":[{"width":1280,"height":853,"url":"https:\/\/wite.oxoooo.com\/wp-content\/uploads\/2021\/09\/pexels-alleksana-4185957.jpg","type":"image\/jpeg"}],"author":"hgostand","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"hgostand","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wite.oxoooo.com\/?p=57#article","isPartOf":{"@id":"https:\/\/wite.oxoooo.com\/?p=57"},"author":{"name":"hgostand","@id":"https:\/\/wite.oxoooo.com\/#\/schema\/person\/00c6377b90c41a8d0789bd572010a7ea"},"headline":"\u65e5\u5fd7\u7ba1\u7406\u7cfb\u7edf\uff0c\u591a\u79cd\u65b9\u5f0f\u603b\u7ed3","datePublished":"2022-03-03T04:22:10+00:00","dateModified":"2022-03-23T07:29:20+00:00","mainEntityOfPage":{"@id":"https:\/\/wite.oxoooo.com\/?p=57"},"wordCount":75,"commentCount":0,"publisher":{"@id":"https:\/\/wite.oxoooo.com\/#\/schema\/person\/00c6377b90c41a8d0789bd572010a7ea"},"image":{"@id":"https:\/\/wite.oxoooo.com\/?p=57#primaryimage"},"thumbnailUrl":"https:\/\/wite.oxoooo.com\/wp-content\/uploads\/2021\/09\/pexels-alleksana-4185957.jpg","articleSection":["\u65f6\u523b"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wite.oxoooo.com\/?p=57#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wite.oxoooo.com\/?p=57","url":"https:\/\/wite.oxoooo.com\/?p=57","name":"\u65e5\u5fd7\u7ba1\u7406\u7cfb\u7edf\uff0c\u591a\u79cd\u65b9\u5f0f\u603b\u7ed3 - WITE","isPartOf":{"@id":"https:\/\/wite.oxoooo.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/wite.oxoooo.com\/?p=57#primaryimage"},"image":{"@id":"https:\/\/wite.oxoooo.com\/?p=57#primaryimage"},"thumbnailUrl":"https:\/\/wite.oxoooo.com\/wp-content\/uploads\/2021\/09\/pexels-alleksana-4185957.jpg","datePublished":"2022-03-03T04:22:10+00:00","dateModified":"2022-03-23T07:29:20+00:00","breadcrumb":{"@id":"https:\/\/wite.oxoooo.com\/?p=57#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wite.oxoooo.com\/?p=57"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/wite.oxoooo.com\/?p=57#primaryimage","url":"https:\/\/wite.oxoooo.com\/wp-content\/uploads\/2021\/09\/pexels-alleksana-4185957.jpg","contentUrl":"https:\/\/wite.oxoooo.com\/wp-content\/uploads\/2021\/09\/pexels-alleksana-4185957.jpg","width":1280,"height":853},{"@type":"BreadcrumbList","@id":"https:\/\/wite.oxoooo.com\/?p=57#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/wite.oxoooo.com\/"},{"@type":"ListItem","position":2,"name":"\u65e5\u5fd7\u7ba1\u7406\u7cfb\u7edf\uff0c\u591a\u79cd\u65b9\u5f0f\u603b\u7ed3"}]},{"@type":"WebSite","@id":"https:\/\/wite.oxoooo.com\/#website","url":"https:\/\/wite.oxoooo.com\/","name":"WITE","description":"\u805a\u7126\u6280\u672f\u9886\u57df\u521b\u65b0","publisher":{"@id":"https:\/\/wite.oxoooo.com\/#\/schema\/person\/00c6377b90c41a8d0789bd572010a7ea"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wite.oxoooo.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/wite.oxoooo.com\/#\/schema\/person\/00c6377b90c41a8d0789bd572010a7ea","name":"hgostand","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.hgostand.com\/wp-content\/uploads\/2022\/03\/\u8d44\u6e90-4@4x.png","url":"https:\/\/www.hgostand.com\/wp-content\/uploads\/2022\/03\/\u8d44\u6e90-4@4x.png","contentUrl":"https:\/\/www.hgostand.com\/wp-content\/uploads\/2022\/03\/\u8d44\u6e90-4@4x.png","width":824,"height":618,"caption":"hgostand"},"logo":{"@id":"https:\/\/www.hgostand.com\/wp-content\/uploads\/2022\/03\/\u8d44\u6e90-4@4x.png"},"url":"https:\/\/wite.oxoooo.com\/?author=2"}]}},"_links":{"self":[{"href":"https:\/\/wite.oxoooo.com\/index.php?rest_route=\/wp\/v2\/posts\/57","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wite.oxoooo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wite.oxoooo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wite.oxoooo.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wite.oxoooo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=57"}],"version-history":[{"count":3,"href":"https:\/\/wite.oxoooo.com\/index.php?rest_route=\/wp\/v2\/posts\/57\/revisions"}],"predecessor-version":[{"id":151,"href":"https:\/\/wite.oxoooo.com\/index.php?rest_route=\/wp\/v2\/posts\/57\/revisions\/151"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wite.oxoooo.com\/index.php?rest_route=\/wp\/v2\/media\/11"}],"wp:attachment":[{"href":"https:\/\/wite.oxoooo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=57"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wite.oxoooo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=57"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wite.oxoooo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=57"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}