{"id":4401,"date":"2021-12-05T19:24:25","date_gmt":"2021-12-05T11:24:25","guid":{"rendered":"http:\/\/123.57.164.21\/?p=4401"},"modified":"2021-12-05T19:24:25","modified_gmt":"2021-12-05T11:24:25","slug":"spring-boot%e6%97%a5%e5%bf%97%e9%85%8d%e7%bd%ae%e5%8f%8a%e8%be%93%e5%87%ba","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=4401","title":{"rendered":"Spring Boot\u65e5\u5fd7\u914d\u7f6e\u53ca\u8f93\u51fa"},"content":{"rendered":"\n<p>\u901a\u8fc7\u4e0a\u8282\u7684\u5b66\u4e60\uff0c\u6211\u4eec\u4e86\u89e3\u4e86 Spring\u00a0 Boot \u65e5\u5fd7\u6846\u67b6\u7684\u9009\u7528\u53ca\u7edf\u4e00\uff0c\u672c\u8282\u6211\u4eec\u5c06\u91cd\u70b9\u4ecb\u7ecd Spring Boot \u65e5\u5fd7\u7684\u914d\u7f6e\u53ca\u8f93\u51fa\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">\u9ed8\u8ba4\u914d\u7f6e<\/h5>\n\n\n\n<p>Spring Boot \u9ed8\u8ba4\u4f7f\u7528 SLF4J+Logback \u8bb0\u5f55\u65e5\u5fd7\uff0c\u5e76\u63d0\u4f9b\u4e86\u9ed8\u8ba4\u914d\u7f6e\uff0c\u5373\u4f7f\u6211\u4eec\u4e0d\u8fdb\u884c\u4efb\u4f55\u989d\u5916\u914d\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528 SLF4J+Logback \u8fdb\u884c\u65e5\u5fd7\u8f93\u51fa\u3002<br><br>\u5e38\u89c1\u7684\u65e5\u5fd7\u914d\u7f6e\u5305\u62ec\u65e5\u5fd7\u7ea7\u522b\u3001\u65e5\u5fd7\u7684\u8f93\u5165\u51fa\u683c\u5f0f\u7b49\u5185\u5bb9\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u65e5\u5fd7\u7ea7\u522b<\/h4>\n\n\n\n<p>\u65e5\u5fd7\u7684\u8f93\u51fa\u90fd\u662f\u5206\u7ea7\u522b\u7684\uff0c\u5f53\u4e00\u6761\u65e5\u5fd7\u4fe1\u606f\u7684\u7ea7\u522b\u5927\u4e8e\u6216\u7b49\u4e8e\u914d\u7f6e\u6587\u4ef6\u7684\u7ea7\u522b\u65f6\uff0c\u5c31\u5bf9\u8fd9\u6761\u65e5\u5fd7\u8fdb\u884c\u8bb0\u5f55\u3002<br><br>\u5e38\u89c1\u7684\u65e5\u5fd7\u7ea7\u522b\u5982\u4e0b\uff08\u4f18\u5148\u7ea7\u4f9d\u6b21\u5347\u9ad8\uff09\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/12\/image-119.png\" alt=\"\" class=\"wp-image-4402\" width=\"493\" height=\"204\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-119.png 726w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-119-300x124.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-119-230x95.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-119-350x145.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-119-480x198.png 480w\" sizes=\"(max-width: 493px) 100vw, 493px\" \/><\/figure><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">\u8f93\u51fa\u683c\u5f0f<\/h4>\n\n\n\n<p>\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u5e38\u7528\u65e5\u5fd7\u53c2\u6570\u5bf9\u65e5\u5fd7\u7684\u8f93\u51fa\u683c\u5f0f\u8fdb\u884c\u4fee\u6539\uff0c\u5982\u4e0b\u8868\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/12\/image-120-1024x715.png\" alt=\"\" class=\"wp-image-4403\" width=\"592\" height=\"413\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-120-1024x715.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-120-300x209.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-120-768x536.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-120-830x580.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-120-230x161.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-120-350x244.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-120-480x335.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-120.png 1034w\" sizes=\"(max-width: 592px) 100vw, 592px\" \/><\/figure><\/div>\n\n\n\n<h5 class=\"wp-block-heading\">\u793a\u4f8b 1<\/h5>\n\n\n\n<p>\u4e0b\u9762\u6211\u4eec\u901a\u8fc7\u4e00\u4e2a\u5b9e\u4f8b\uff0c\u6765\u67e5\u770b Spring Boot \u63d0\u4f9b\u4e86\u54ea\u4e9b\u9ed8\u8ba4\u65e5\u5fd7\u914d\u7f6e\u3002<br><br>1. \u5728 Spring Boot \u4e2d\u7f16\u5199 Java \u6d4b\u8bd5\u7c7b\uff0c\u4ee3\u7801\u5982\u4e0b\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    package net.biancheng.www;\n    import org.junit.jupiter.api.Test;\n    import org.slf4j.Logger;\n    import org.slf4j.LoggerFactory;\n    import org.springframework.boot.test.context.SpringBootTest;\n    @SpringBootTest\n    class SpringbootLoggingApplicationTests {\n        Logger logger = LoggerFactory.getLogger(getClass());\n        \/**\n         * \u6d4b\u8bd5\u65e5\u5fd7\u8f93\u51fa\n         * SLF4J \u65e5\u5fd7\u7ea7\u522b\u4ece\u5c0f\u5230\u5927trace>debug>info>warn>error\n         *\/\n        @Test\n        void logTest() {\n            \/\/\u65e5\u5fd7\u7ea7\u522b \u7531\u4f4e\u5230\u9ad8\n            logger.trace(\"trace \u7ea7\u522b\u65e5\u5fd7\");\n            logger.debug(\"debug \u7ea7\u522b\u65e5\u5fd7\");\n            logger.info(\"info \u7ea7\u522b\u65e5\u5fd7\");\n            logger.warn(\"warn \u7ea7\u522b\u65e5\u5fd7\");\n            logger.error(\"error \u7ea7\u522b\u65e5\u5fd7\");\n        }\n    }<\/pre>\n\n\n\n<p>2. \u6267\u884c\u8be5\u6d4b\u8bd5\uff0c\u63a7\u5236\u53f0\u8f93\u51fa\u5982\u4e0b\u56fe\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/12\/image-121-1024x275.png\" alt=\"\" class=\"wp-image-4404\" width=\"639\" height=\"171\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-121-1024x275.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-121-300x81.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-121-768x207.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-121-1536x413.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-121-830x223.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-121-230x62.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-121-350x94.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-121-480x129.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-121.png 1792w\" sizes=\"(max-width: 639px) 100vw, 639px\" \/><\/figure><\/div>\n\n\n\n<p>\u901a\u8fc7\u63a7\u5236\u53f0\u8f93\u51fa\u7ed3\u679c\u53ef\u77e5\uff0cSpring Boot \u65e5\u5fd7\u9ed8\u8ba4\u7ea7\u522b\u4e3a info\uff0c\u65e5\u5fd7\u8f93\u51fa\u5185\u5bb9\u9ed8\u8ba4\u5305\u542b\u4ee5\u4e0b\u5143\u7d20\uff1a<\/p>\n\n\n\n<ul><li>\u65f6\u95f4\u65e5\u671f<\/li><li>\u65e5\u5fd7\u7ea7\u522b<\/li><li>\u8fdb\u7a0b ID<\/li><li>\u5206\u9694\u7b26\uff1a&#8212;<\/li><li>\u7ebf\u7a0b\u540d\uff1a\u65b9\u62ec\u53f7\u62ec\u8d77\u6765\uff08\u53ef\u80fd\u4f1a\u622a\u65ad\u63a7\u5236\u53f0\u8f93\u51fa\uff09<\/li><li>Logger \u540d\u79f0<\/li><li>\u65e5\u5fd7\u5185\u5bb9<\/li><\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">\u4fee\u6539\u9ed8\u8ba4\u65e5\u5fd7\u914d\u7f6e<\/h5>\n\n\n\n<p>\u6211\u4eec\u53ef\u4ee5\u6839\u636e\u81ea\u8eab\u7684\u9700\u6c42\uff0c\u901a\u8fc7\u5168\u5c40\u914d\u7f6e\u6587\u4ef6\uff08application.properties\/yml\uff09\u4fee\u6539 Spring Boot \u65e5\u5fd7\u7ea7\u522b\u548c\u663e\u793a\u683c\u5f0f\u7b49\u9ed8\u8ba4\u914d\u7f6e\u3002<br>&nbsp;<\/p>\n\n\n\n<p>\u5728 application.properties \u4e2d\uff0c\u4fee\u6539 Spring Boot \u65e5\u5fd7\u7684\u9ed8\u8ba4\u914d\u7f6e\uff0c\u4ee3\u7801\u5982\u4e0b\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    #\u65e5\u5fd7\u7ea7\u522b\n    logging.level.net.biancheng.www=trace\n    #\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\u7684\u65b9\u5f0f\u8bbe\u7f6e\u65e5\u5fd7\u8f93\u51fa\u7684\u4f4d\u7f6e\uff08\u9879\u76ee\u6839\u76ee\u5f55\u76ee\u5f55\\my-log\\mylog\\spring.log\uff09\n    #logging.file.path=my-log\/myLog\n    #\u7edd\u5bf9\u8def\u5f84\u65b9\u5f0f\u5c06\u65e5\u5fd7\u6587\u4ef6\u8f93\u51fa\u5230 \u3010\u9879\u76ee\u6240\u5728\u78c1\u76d8\u6839\u76ee\u5f55\\springboot\\logging\\my\\spring.log\u3011\n    logging.file.path=\/spring-boot\/logging\n    #\u63a7\u5236\u53f0\u65e5\u5fd7\u8f93\u51fa\u683c\u5f0f\n    logging.pattern.console=%d{yyyy-MM-dd hh:mm:ss} [%thread] %-5level %logger{50} - %msg%n\n    #\u65e5\u5fd7\u6587\u4ef6\u8f93\u51fa\u683c\u5f0f\n    logging.pattern.file=%d{yyyy-MM-dd} === [%thread] === %-5level === %logger{50} === - %msg%n<\/pre>\n\n\n\n<p>\u6267\u884c\u6d4b\u8bd5\u4ee3\u7801\uff0c\u6267\u884c\u7ed3\u679c\u5982\u4e0b\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/12\/image-122-1024x342.png\" alt=\"\" class=\"wp-image-4405\" width=\"646\" height=\"215\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-122-1024x342.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-122-300x100.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-122-768x256.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-122-1536x513.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-122-830x277.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-122-230x77.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-122-350x117.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-122-480x160.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-122.png 1798w\" sizes=\"(max-width: 646px) 100vw, 646px\" \/><\/figure><\/div>\n\n\n\n<p><br>\u4ece\u56fe 2 \u53ef\u4ee5\u770b\u5230\uff0c\u63a7\u5236\u53f0\u4e2d\u65e5\u5fd7\u7684\u8f93\u51fa\u683c\u5f0f\u4e0e application.properties \u4e2d\u7684 logging.pattern.console \u914d\u7f6e\u4e00\u81f4\u3002<br><br>\u67e5\u770b\u672c\u5730\u65e5\u5fd7\u6587\u4ef6 spring.log\uff0c\u8be5\u6587\u4ef6\u65e5\u5fd7\u8f93\u51fa\u5185\u5bb9\u5982\u4e0b\u56fe\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/12\/image-123-1024x178.png\" alt=\"\" class=\"wp-image-4406\" width=\"650\" height=\"113\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-123-1024x178.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-123-300x52.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-123-768x134.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-123-1536x268.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-123-830x145.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-123-230x40.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-123-350x61.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-123-480x84.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-123.png 1790w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/figure><\/div>\n\n\n\n<p>\u4ece\u56fe 3 \u53ef\u4ee5\u770b\u5230\uff0c\u672c\u5730\u65e5\u5fd7\u6587\u4ef6\u4e2d\u7684\u65e5\u5fd7\u8f93\u51fa\u683c\u5f0f\u4e0e application.properties \u4e2d\u00a0logging.pattern.file \u914d\u7f6e\u4e00\u81f4\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">\u81ea\u5b9a\u4e49\u65e5\u5fd7\u914d\u7f6e<\/h5>\n\n\n\n<p>\u5728 Spring Boot \u7684\u914d\u7f6e\u6587\u4ef6 application.porperties\/yml \u4e2d\uff0c\u53ef\u4ee5\u5bf9\u65e5\u5fd7\u7684\u4e00\u4e9b\u9ed8\u8ba4\u914d\u7f6e\u8fdb\u884c\u4fee\u6539\uff0c\u4f46\u8fd9\u79cd\u65b9\u5f0f\u53ea\u80fd\u4fee\u6539\u4e2a\u522b\u7684\u65e5\u5fd7\u914d\u7f6e\uff0c\u60f3\u8981\u4fee\u6539\u66f4\u591a\u7684\u914d\u7f6e\u6216\u8005\u4f7f\u7528\u66f4\u9ad8\u7ea7\u7684\u529f\u80fd\uff0c\u5219\u9700\u8981\u901a\u8fc7\u65e5\u5fd7\u5b9e\u73b0\u6846\u67b6\u81ea\u5df1\u7684\u914d\u7f6e\u6587\u4ef6\u8fdb\u884c\u914d\u7f6e\u3002<br><br>Spring \u5b98\u65b9\u63d0\u4f9b\u4e86\u5404\u4e2a\u65e5\u5fd7\u5b9e\u73b0\u6846\u67b6\u6240\u9700\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u7528\u6237\u53ea\u8981\u5c06\u6307\u5b9a\u7684\u914d\u7f6e\u6587\u4ef6\u653e\u7f6e\u5230\u9879\u76ee\u7684\u7c7b\u8def\u5f84\u4e0b\u5373\u53ef\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/12\/image-124.png\" alt=\"\" class=\"wp-image-4407\" width=\"571\" height=\"138\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-124.png 910w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-124-300x73.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-124-768x186.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-124-830x201.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-124-230x56.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-124-350x85.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-124-480x116.png 480w\" sizes=\"(max-width: 571px) 100vw, 571px\" \/><\/figure><\/div>\n\n\n\n<p>\u4ece\u4e0a\u8868\u53ef\u4ee5\u770b\u51fa\uff0c\u65e5\u5fd7\u6846\u67b6\u7684\u914d\u7f6e\u6587\u4ef6\u57fa\u672c\u4e0a\u88ab\u5206\u4e3a 2 \u7c7b\uff1a<\/p>\n\n\n\n<ul><li>\u666e\u901a\u65e5\u5fd7\u914d\u7f6e\u6587\u4ef6\uff0c\u5373\u4e0d\u5e26 srping \u6807\u8bc6\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u4f8b\u5982 logback.xml\uff1b<\/li><li>\u5e26\u6709 spring \u8868\u793a\u7684\u65e5\u5fd7\u914d\u7f6e\u6587\u4ef6\uff0c\u4f8b\u5982 logback-spring.xml\u3002<\/li><\/ul>\n\n\n\n<p><br>\u8fd9\u4e24\u79cd\u65e5\u5fd7\u914d\u7f6e\u6587\u4ef6\u5728\u4f7f\u7528\u65f6\u5927\u4e0d\u76f8\u540c\uff0c\u4e0b\u9762\u6211\u4eec\u5c31\u5bf9\u5b83\u4eec\u5206\u522b\u8fdb\u884c\u4ecb\u7ecd\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">\u666e\u901a\u65e5\u5fd7\u914d\u7f6e\u6587\u4ef6<\/h5>\n\n\n\n<p>\u6211\u4eec\u5c06 logback.xml\u3001log4j2.xml \u7b49\u4e0d\u5e26 spring \u6807\u8bc6\u7684\u666e\u901a\u65e5\u5fd7\u914d\u7f6e\u6587\u4ef6\uff0c\u653e\u5728\u9879\u76ee\u7684\u7c7b\u8def\u5f84\u4e0b\u540e\uff0c\u8fd9\u4e9b\u914d\u7f6e\u6587\u4ef6\u4f1a\u8df3\u8fc7 Spring Boot\uff0c\u76f4\u63a5\u88ab\u65e5\u5fd7\u6846\u67b6\u52a0\u8f7d\u3002\u901a\u8fc7\u8fd9\u4e9b\u914d\u7f6e\u6587\u4ef6\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u8fbe\u5230\u81ea\u5b9a\u4e49\u65e5\u5fd7\u914d\u7f6e\u7684\u76ee\u7684\u3002<\/p>\n\n\n\n<p><strong>\u793a\u4f8b<\/strong><\/p>\n\n\n\n<p>1. \u5c06 logback.xml \u52a0\u5165\u5230 Spring Boot \u9879\u76ee\u7684\u7c7b\u8def\u5f84\u4e0b\uff08resources \u76ee\u5f55\u4e0b\uff09\uff0c\u8be5\u914d\u7f6e\u6587\u4ef6\u914d\u7f6e\u5185\u5bb9\u5982\u4e0b\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    &lt;?xml version=\"1.0\" encoding=\"UTF-8\"?>\n    &lt;!--\n    scan\uff1a\u5f53\u6b64\u5c5e\u6027\u8bbe\u7f6e\u4e3atrue\u65f6\uff0c\u914d\u7f6e\u6587\u4ef6\u5982\u679c\u53d1\u751f\u6539\u53d8\uff0c\u5c06\u4f1a\u88ab\u91cd\u65b0\u52a0\u8f7d\uff0c\u9ed8\u8ba4\u503c\u4e3atrue\u3002\n    scanPeriod\uff1a\u8bbe\u7f6e\u76d1\u6d4b\u914d\u7f6e\u6587\u4ef6\u662f\u5426\u6709\u4fee\u6539\u7684\u65f6\u95f4\u95f4\u9694\uff0c\u5982\u679c\u6ca1\u6709\u7ed9\u51fa\u65f6\u95f4\u5355\u4f4d\uff0c\u9ed8\u8ba4\u5355\u4f4d\u662f\u6beb\u79d2\u5f53scan\u4e3atrue\u65f6\uff0c\u6b64\u5c5e\u6027\u751f\u6548\u3002\u9ed8\u8ba4\u7684\u65f6\u95f4\u95f4\u9694\u4e3a1\u5206\u949f\u3002\n    debug\uff1a\u5f53\u6b64\u5c5e\u6027\u8bbe\u7f6e\u4e3atrue\u65f6\uff0c\u5c06\u6253\u5370\u51falogback\u5185\u90e8\u65e5\u5fd7\u4fe1\u606f\uff0c\u5b9e\u65f6\u67e5\u770blogback\u8fd0\u884c\u72b6\u6001\u3002\u9ed8\u8ba4\u503c\u4e3afalse\u3002\n    -->\n    &lt;configuration scan=\"false\" scanPeriod=\"60 seconds\" debug=\"false\">\n        &lt;!-- \u5b9a\u4e49\u65e5\u5fd7\u7684\u6839\u76ee\u5f55 -->\n        &lt;property name=\"LOG_HOME\" value=\"\/app\/log\"\/>\n        &lt;!-- \u5b9a\u4e49\u65e5\u5fd7\u6587\u4ef6\u540d\u79f0 -->\n        &lt;property name=\"appName\" value=\"bianchengbang-spring-boot-logging\">&lt;\/property>\n        &lt;!-- ch.qos.logback.core.ConsoleAppender \u8868\u793a\u63a7\u5236\u53f0\u8f93\u51fa -->\n        &lt;appender name=\"stdout\" class=\"ch.qos.logback.core.ConsoleAppender\">\n            &lt;!--\n            \u65e5\u5fd7\u8f93\u51fa\u683c\u5f0f\uff1a\n       %d\u8868\u793a\u65e5\u671f\u65f6\u95f4\uff0c\n       %thread\u8868\u793a\u7ebf\u7a0b\u540d\uff0c\n       %-5level\uff1a\u7ea7\u522b\u4ece\u5de6\u663e\u793a5\u4e2a\u5b57\u7b26\u5bbd\u5ea6\n       %logger{50} \u8868\u793alogger\u540d\u5b57\u6700\u957f50\u4e2a\u5b57\u7b26\uff0c\u5426\u5219\u6309\u7167\u53e5\u70b9\u5206\u5272\u3002\n       %msg\uff1a\u65e5\u5fd7\u6d88\u606f\uff0c\n       %n\u662f\u6362\u884c\u7b26\n            -->\n            &lt;layout class=\"ch.qos.logback.classic.PatternLayout\">\n                &lt;pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread]**************** %-5level %logger{50} - %msg%n&lt;\/pattern>\n            &lt;\/layout>\n        &lt;\/appender>\n        &lt;!-- \u6eda\u52a8\u8bb0\u5f55\u6587\u4ef6\uff0c\u5148\u5c06\u65e5\u5fd7\u8bb0\u5f55\u5230\u6307\u5b9a\u6587\u4ef6\uff0c\u5f53\u7b26\u5408\u67d0\u4e2a\u6761\u4ef6\u65f6\uff0c\u5c06\u65e5\u5fd7\u8bb0\u5f55\u5230\u5176\u4ed6\u6587\u4ef6 -->\n        &lt;appender name=\"appLogAppender\" class=\"ch.qos.logback.core.rolling.RollingFileAppender\">\n            &lt;!-- \u6307\u5b9a\u65e5\u5fd7\u6587\u4ef6\u7684\u540d\u79f0 -->\n            &lt;file>${LOG_HOME}\/${appName}.log&lt;\/file>\n            &lt;!--\n            \u5f53\u53d1\u751f\u6eda\u52a8\u65f6\uff0c\u51b3\u5b9a RollingFileAppender \u7684\u884c\u4e3a\uff0c\u6d89\u53ca\u6587\u4ef6\u79fb\u52a8\u548c\u91cd\u547d\u540d\n            TimeBasedRollingPolicy\uff1a \u6700\u5e38\u7528\u7684\u6eda\u52a8\u7b56\u7565\uff0c\u5b83\u6839\u636e\u65f6\u95f4\u6765\u5236\u5b9a\u6eda\u52a8\u7b56\u7565\uff0c\u65e2\u8d1f\u8d23\u6eda\u52a8\u4e5f\u8d1f\u8d23\u51fa\u53d1\u6eda\u52a8\u3002\n            -->\n            &lt;rollingPolicy class=\"ch.qos.logback.core.rolling.TimeBasedRollingPolicy\">\n                &lt;!--\n                \u6eda\u52a8\u65f6\u4ea7\u751f\u7684\u6587\u4ef6\u7684\u5b58\u653e\u4f4d\u7f6e\u53ca\u6587\u4ef6\u540d\u79f0 %d{yyyy-MM-dd}\uff1a\u6309\u5929\u8fdb\u884c\u65e5\u5fd7\u6eda\u52a8\n                %i\uff1a\u5f53\u6587\u4ef6\u5927\u5c0f\u8d85\u8fc7maxFileSize\u65f6\uff0c\u6309\u7167i\u8fdb\u884c\u6587\u4ef6\u6eda\u52a8\n                -->\n                &lt;fileNamePattern>${LOG_HOME}\/${appName}-%d{yyyy-MM-dd}-%i.log&lt;\/fileNamePattern>\n                &lt;!--\n                \u53ef\u9009\u8282\u70b9\uff0c\u63a7\u5236\u4fdd\u7559\u7684\u5f52\u6863\u6587\u4ef6\u7684\u6700\u5927\u6570\u91cf\uff0c\u8d85\u51fa\u6570\u91cf\u5c31\u5220\u9664\u65e7\u6587\u4ef6\u3002\u5047\u8bbe\u8bbe\u7f6e\u6bcf\u5929\u6eda\u52a8\uff0c\n                \u4e14maxHistory\u662f365\uff0c\u5219\u53ea\u4fdd\u5b58\u6700\u8fd1365\u5929\u7684\u6587\u4ef6\uff0c\u5220\u9664\u4e4b\u524d\u7684\u65e7\u6587\u4ef6\u3002\u6ce8\u610f\uff0c\u5220\u9664\u65e7\u6587\u4ef6\u662f\uff0c\n                \u90a3\u4e9b\u4e3a\u4e86\u5f52\u6863\u800c\u521b\u5efa\u7684\u76ee\u5f55\u4e5f\u4f1a\u88ab\u5220\u9664\u3002\n                -->\n                &lt;MaxHistory>365&lt;\/MaxHistory>\n                &lt;!--\n                \u5f53\u65e5\u5fd7\u6587\u4ef6\u8d85\u8fc7maxFileSize\u6307\u5b9a\u7684\u5927\u5c0f\u662f\uff0c\u6839\u636e\u4e0a\u9762\u63d0\u5230\u7684%i\u8fdb\u884c\u65e5\u5fd7\u6587\u4ef6\u6eda\u52a8 \u6ce8\u610f\u6b64\u5904\u914d\u7f6eSizeBasedTriggeringPolicy\u662f\u65e0\u6cd5\u5b9e\u73b0\u6309\u6587\u4ef6\u5927\u5c0f\u8fdb\u884c\u6eda\u52a8\u7684\uff0c\u5fc5\u987b\u914d\u7f6etimeBasedFileNamingAndTriggeringPolicy\n                -->\n                &lt;timeBasedFileNamingAndTriggeringPolicy class=\"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP\">\n                    &lt;maxFileSize>100MB&lt;\/maxFileSize>\n                &lt;\/timeBasedFileNamingAndTriggeringPolicy>\n            &lt;\/rollingPolicy>\n            &lt;!-- \u65e5\u5fd7\u8f93\u51fa\u683c\u5f0f\uff1a -->\n            &lt;layout class=\"ch.qos.logback.classic.PatternLayout\">\n                &lt;pattern>%d{yyyy-MM-dd HH:mm:ss} [ %thread ] ------------------ [ %-5level ] [ %logger{50} : %line ] -\n                    %msg%n\n                &lt;\/pattern>\n            &lt;\/layout>\n        &lt;\/appender>\n        &lt;!--\n      logger\u4e3b\u8981\u7528\u4e8e\u5b58\u653e\u65e5\u5fd7\u5bf9\u8c61\uff0c\u4e5f\u53ef\u4ee5\u5b9a\u4e49\u65e5\u5fd7\u7c7b\u578b\u3001\u7ea7\u522b\n      name\uff1a\u8868\u793a\u5339\u914d\u7684logger\u7c7b\u578b\u524d\u7f00\uff0c\u4e5f\u5c31\u662f\u5305\u7684\u524d\u534a\u90e8\u5206\n      level\uff1a\u8981\u8bb0\u5f55\u7684\u65e5\u5fd7\u7ea7\u522b\uff0c\u5305\u62ec TRACE &lt; DEBUG &lt; INFO &lt; WARN &lt; ERROR\n      additivity\uff1a\u4f5c\u7528\u5728\u4e8echildren-logger\u662f\u5426\u4f7f\u7528 rootLogger\u914d\u7f6e\u7684appender\u8fdb\u884c\u8f93\u51fa\uff0c\n      false\uff1a\u8868\u793a\u53ea\u7528\u5f53\u524dlogger\u7684appender-ref\uff0ctrue\uff1a\n      \u8868\u793a\u5f53\u524dlogger\u7684appender-ref\u548crootLogger\u7684appender-ref\u90fd\u6709\u6548\n        -->\n        &lt;!-- hibernate logger -->\n        &lt;logger name=\"net.biancheng.www\" level=\"debug\"\/>\n        &lt;!-- Spring framework logger -->\n        &lt;logger name=\"org.springframework\" level=\"debug\" additivity=\"false\">&lt;\/logger>\n        &lt;!--\n        root\u4e0elogger\u662f\u7236\u5b50\u5173\u7cfb\uff0c\u6ca1\u6709\u7279\u522b\u5b9a\u4e49\u5219\u9ed8\u8ba4\u4e3aroot\uff0c\u4efb\u4f55\u4e00\u4e2a\u7c7b\u53ea\u4f1a\u548c\u4e00\u4e2alogger\u5bf9\u5e94\uff0c\n        \u8981\u4e48\u662f\u5b9a\u4e49\u7684logger\uff0c\u8981\u4e48\u662froot\uff0c\u5224\u65ad\u7684\u5173\u952e\u5728\u4e8e\u627e\u5230\u8fd9\u4e2alogger\uff0c\u7136\u540e\u5224\u65ad\u8fd9\u4e2alogger\u7684appender\u548clevel\u3002\n        -->\n        &lt;root level=\"info\">\n            &lt;appender-ref ref=\"stdout\"\/>\n            &lt;appender-ref ref=\"appLogAppender\"\/>\n        &lt;\/root>\n    &lt;\/configuration> <\/pre>\n\n\n\n<p>2. \u542f\u52a8\u8be5\u9879\u76ee\u5e76\u542f\u52a8\u6d4b\u8bd5\u7a0b\u5e8f\uff0c\u7ed3\u679c\u5982\u4e0b\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">      .   ____          _            __ _ _\n    \/\\\\ \/ ___'_ __ _ _(_)_ __  __ _ \\ \\ \\ \\\n    ( ( )\\___ | '_ | '_| | '_ \\\/ _` | \\ \\ \\ \\\n    \\\\\/  ___)| |_)| | | | | || (_| |  ) ) ) )\n      '  |____| .__|_| |_|_| |_\\__, | \/ \/ \/ \/\n    =========|_|==============|___\/=\/_\/_\/_\/\n    :: Spring Boot ::                (v2.5.0)\n    2021-05-24 14:51:11 [main]**************** INFO  n.biancheng.www.SpringBootLoggingApplicationTests - Starting SpringBootLoggingApplicationTests using Java 1.8.0_131 on LAPTOP-C67MRMAG with PID 20080 (started by 79330 in D:\\eclipse workSpace4\\spring-boot-logging)\n    2021-05-24 14:51:11 [main]**************** DEBUG n.biancheng.www.SpringBootLoggingApplicationTests - Running with Spring Boot v2.5.0, Spring v5.3.7\n    2021-05-24 14:51:11 [main]**************** INFO  n.biancheng.www.SpringBootLoggingApplicationTests - The following profiles are active: dev\n    2021-05-24 14:51:13 [main]**************** INFO  n.biancheng.www.SpringBootLoggingApplicationTests - Started SpringBootLoggingApplicationTests in 2.058 seconds (JVM running for 3.217)\n    2021-05-24 14:51:13 [main]**************** DEBUG n.biancheng.www.SpringBootLoggingApplicationTests - debug \u7ea7\u522b\u65e5\u5fd7\n    2021-05-24 14:51:13 [main]**************** INFO  n.biancheng.www.SpringBootLoggingApplicationTests - info \u7ea7\u522b\u65e5\u5fd7\n    2021-05-24 14:51:13 [main]**************** WARN  n.biancheng.www.SpringBootLoggingApplicationTests - warn \u7ea7\u522b\u65e5\u5fd7\n    2021-05-24 14:51:13 [main]**************** ERROR n.biancheng.www.SpringBootLoggingApplicationTests - error \u7ea7\u522b\u65e5\u5fd7<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">\u5e26\u6709 spring \u6807\u8bc6\u7684\u65e5\u5fd7\u914d\u7f6e\u6587\u4ef6<\/h5>\n\n\n\n<p>Spring Boot \u63a8\u8350\u7528\u6237\u4f7f\u7528&nbsp;logback-spring.xml\u3001log4j2-spring.xml \u7b49\u8fd9\u79cd\u5e26\u6709 spring \u6807\u8bc6\u7684\u914d\u7f6e\u6587\u4ef6\u3002\u8fd9\u79cd\u914d\u7f6e\u6587\u4ef6\u88ab\u653e\u5728\u9879\u76ee\u7c7b\u8def\u5f84\u540e\uff0c\u4e0d\u4f1a\u76f4\u63a5\u88ab\u65e5\u5fd7\u6846\u67b6\u52a0\u8f7d\uff0c\u800c\u662f\u7531 Spring Boot \u5bf9\u5b83\u4eec\u8fdb\u884c\u89e3\u6790\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u4f7f\u7528 Spring Boot \u7684\u9ad8\u7ea7\u529f\u80fd Profile\uff0c\u5b9e\u73b0\u5728\u4e0d\u540c\u7684\u73af\u5883\u4e2d\u4f7f\u7528\u4e0d\u540c\u7684\u65e5\u5fd7\u914d\u7f6e\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u793a\u4f8b<\/h4>\n\n\n\n<p>1. \u5c06 logback.xml \u6587\u4ef6\u540d\u4fee\u6539\u4e3a logback-spring.xml\uff0c\u5e76\u5c06\u914d\u7f6e\u6587\u4ef6\u4e2d\u65e5\u5fd7\u8f93\u51fa\u683c\u5f0f\u7684\u914d\u7f6e\u4fee\u6539\u4e3a\u4f7f\u7528 Profile \u529f\u80fd\u7684\u914d\u7f6e\u3002<br><br>2. \u914d\u7f6e\u5185\u5bb9\u4fee\u6539\u524d\uff0c\u65e5\u5fd7\u8f93\u51fa\u683c\u5f0f\u914d\u7f6e\u5982\u4e0b\u3002\u00a0<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    &lt;configuration scan=\"false\" scanPeriod=\"60 seconds\" debug=\"false\">\n        ......\n        &lt;appender name=\"stdout\" class=\"ch.qos.logback.core.ConsoleAppender\">\n            &lt;layout class=\"ch.qos.logback.classic.PatternLayout\">\n                &lt;pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread]**************** %-5level %logger{50} - %msg%n&lt;\/pattern>\n            &lt;\/layout>\n        &lt;\/appender>\n        ......\n    &lt;\/configuration> <\/pre>\n\n\n\n<p>3. \u4fee\u6539 logback-spring.xml \u7684\u914d\u7f6e\u5185\u5bb9\uff0c\u901a\u8fc7 Profile \u529f\u80fd\u5b9e\u73b0\u5728\u4e0d\u540c\u7684\u73af\u5883\u4e2d\u4f7f\u7528\u4e0d\u540c\u7684\u65e5\u5fd7\u8f93\u51fa\u683c\u5f0f\uff0c\u914d\u7f6e\u5982\u4e0b\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    &lt;configuration scan=\"false\" scanPeriod=\"60 seconds\" debug=\"false\">\n        ......\n        &lt;appender name=\"stdout\" class=\"ch.qos.logback.core.ConsoleAppender\">\n           &lt;layout class=\"ch.qos.logback.classic.PatternLayout\">\n                &lt;!--\u5f00\u53d1\u73af\u5883 \u65e5\u5fd7\u8f93\u51fa\u683c\u5f0f-->\n                &lt;springProfile name=\"dev\">\n                    &lt;pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ----> [%thread] ---> %-5level %logger{50} - %msg%n&lt;\/pattern>\n                &lt;\/springProfile>\n                &lt;!--\u975e\u5f00\u53d1\u73af\u5883 \u65e5\u5fd7\u8f93\u51fa\u683c\u5f0f-->\n                &lt;springProfile name=\"!dev\">\n                    &lt;pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} ==== [%thread] ==== %-5level %logger{50} - %msg%n&lt;\/pattern>\n                &lt;\/springProfile>\n            &lt;\/layout>\n        &lt;\/appender>\n        ......\n    &lt;\/configuration> <\/pre>\n\n\n\n<p>4. \u5728 Spring Boot \u9879\u76ee\u7684 application.yml \u4e2d\uff0c\u6fc0\u6d3b\u5f00\u53d1\u73af\u5883\uff08dev\uff09\u7684 Profile\uff0c\u914d\u7f6e\u5185\u5bb9\u5982\u4e0b\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    #\u9ed8\u8ba4\u914d\u7f6e\n    server:\n      port: 8080\n    #\u5207\u6362\u914d\u7f6e\n    spring:\n      profiles:\n        active: dev\n    ---\n    #\u5f00\u53d1\u73af\u5883\n    server:\n      port: 8081\n    spring:\n      config:\n        activate:\n          on-profile: dev\n    ---\n    #\u6d4b\u8bd5\u73af\u5883\n    server:\n      port: 8082\n    spring:\n      config:\n        activate:\n          on-profile: test\n    ---\n    #\u751f\u4ea7\u73af\u5883\n    server:\n      port: 8083\n    spring:\n      config:\n        activate:\n          on-profile: prod<\/pre>\n\n\n\n<p>5. \u542f\u52a8 Spring Boot \u5e76\u6267\u884c\u6d4b\u8bd5\u4ee3\u7801\uff0c\u63a7\u5236\u53f0\u8f93\u51fa\u5982\u4e0b\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/12\/image-125-1024x289.png\" alt=\"\" class=\"wp-image-4408\" width=\"595\" height=\"168\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-125-1024x289.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-125-300x85.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-125-768x216.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-125-1536x433.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-125-830x234.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-125-230x65.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-125-350x99.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-125-480x135.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-125.png 1788w\" sizes=\"(max-width: 595px) 100vw, 595px\" \/><\/figure><\/div>\n\n\n\n<p>6. \u4fee\u6539 appplication.yml \u4e2d\u7684\u914d\u7f6e\uff0c\u6fc0\u6d3b\u6d4b\u8bd5\u73af\u5883\uff08test\uff09\u7684 Profile\uff0c\u914d\u7f6e\u5982\u4e0b\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    #\u9ed8\u8ba4\u914d\u7f6e\n    server:\n      port: 8080\n    #\u5207\u6362\u914d\u7f6e\n    spring:\n      profiles:\n        active: test\n    ---\n    #\u5f00\u53d1\u73af\u5883\n    server:\n      port: 8081\n    spring:\n      config:\n        activate:\n          on-profile: dev\n    ---\n    #\u6d4b\u8bd5\u73af\u5883\n    server:\n      port: 8082\n    spring:\n      config:\n        activate:\n          on-profile: test\n    ---\n    #\u751f\u4ea7\u73af\u5883\n    server:\n      port: 8083\n    spring:\n      config:\n        activate:\n          on-profile: prod<\/pre>\n\n\n\n<p>7. \u91cd\u542f Spring Boot \u5e76\u6267\u884c\u6d4b\u8bd5\u4ee3\u7801\uff0c\u63a7\u5236\u53f0\u8f93\u51fa\u5982\u4e0b\u3002<br><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/12\/image-126-1024x270.png\" alt=\"\" class=\"wp-image-4409\" width=\"659\" height=\"173\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-126-1024x270.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-126-300x79.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-126-768x203.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-126-1536x405.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-126-830x219.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-126-230x61.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-126-350x92.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-126-480x127.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/12\/image-126.png 1812w\" sizes=\"(max-width: 659px) 100vw, 659px\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u901a\u8fc7\u4e0a\u8282\u7684\u5b66\u4e60\uff0c\u6211\u4eec\u4e86\u89e3\u4e86 Spring\u00a0 Boot \u65e5\u5fd7\u6846\u67b6\u7684\u9009\u7528\u53ca\u7edf\u4e00\uff0c\u672c\u8282\u6211\u4eec\u5c06\u91cd\u70b9\u4ecb\u7ecd Spring  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,27],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/4401"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4401"}],"version-history":[{"count":1,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/4401\/revisions"}],"predecessor-version":[{"id":4410,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/4401\/revisions\/4410"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4401"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4401"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}