{"id":11771,"date":"2023-08-11T13:07:58","date_gmt":"2023-08-11T05:07:58","guid":{"rendered":"http:\/\/92it.top\/?p=11771"},"modified":"2023-08-11T13:07:58","modified_gmt":"2023-08-11T05:07:58","slug":"spring-%e4%b8%ad%e9%a6%96%e5%ad%97%e6%af%8d%e5%b0%8f%e5%86%99%ef%bc%8c%e7%ac%ac%e4%ba%8c%e4%b8%aa%e5%ad%97%e6%af%8d%e5%a4%a7%e5%86%99%e9%80%a0%e6%88%90%e7%9a%84%e5%8f%82%e6%95%b0%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=11771","title":{"rendered":"Spring \u4e2d\u9996\u5b57\u6bcd\u5c0f\u5199\uff0c\u7b2c\u4e8c\u4e2a\u5b57\u6bcd\u5927\u5199\u9020\u6210\u7684\u53c2\u6570\u95ee\u9898\uff1f"},"content":{"rendered":"\n<p><strong>\u95ee\u9898\u73b0\u8c61<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>vSwitchId\u3001uShape\u3001iPhone\u2026 \u8fd9\u7c7b\u5b57\u6bb5\u540d\uff0c\u6709\u4ec0\u4e48\u7279\u70b9\uff1f\u5f88\u5bb9\u6613\u770b\u51fa\u6765\u5427\uff0c\u9996\u5b57\u6bcd\u5c0f\u5199\uff0c\u7b2c\u4e8c\u4e2a\u5b57\u6bcd\u5927\u5199\u3002\u5b83\u4eec\u770b\u8d77\u6765\u786e\u5b9e\u662f\u7b26\u5408 Java \u4e2d\u5bf9\u5b57\u6bb5\u6240\u63a8\u5d07\u7684\u201c\u5c0f\u9a7c\u5cf0\u547d\u540d\u6cd5\u201d\uff0c\u5373\u7b2c\u4e00\u4e2a\u5355\u8bcd\u5c0f\u5199\uff0c\u540e\u9762\u7684\u5355\u8bcd\u9996\u5b57\u6bcd\u5927\u5199\u3002\u4f46\u662f\uff0c\u5982\u679c\u4f60\u5728\u9879\u76ee\u4e2d\u7ed9 POJO \u7c7b\u7684\u5b57\u6bb5\u4ee5\u8fd9\u79cd\u5f62\u5f0f\u8fdb\u884c\u547d\u540d\u7684\u8bdd\uff0c\u90a3\u4e48\u53ef\u80fd\u4f1a\u78b0\u5230 \u5e8f\u5217\u5316\/\u53cd\u5e8f\u5217\u5316 \u7684\u95ee\u9898\u3002\u3002\u3002\u4e0b\u9762\u5c31\u662f\u4e00\u4e2a\u6211\u5728\u9879\u76ee\u4e2d\u4eb2\u81ea\u8e29\u8fc7\u7684\u5751<\/p>\n\n\n\n<p>Spring Web \u5f00\u53d1\u4e2d\uff0c\u6211\u4eec\u5f80\u5f80\u4f7f\u7528 POJO \u5bf9\u8c61\u6765\u5145\u5f53\u8bf7\u6c42\u4f20\u9012\u65f6\u7684 body\u3002\u4f8b\u5982\u73b0\u6709\u4e00\u4e2a\u7528\u4e8e\u4f20\u8f93\u7684 POJO \u5bf9\u8c61\uff0c\u6211\u5c06\u5176\u8fdb\u884c\u7b80\u5316\u540e\u5982\u4e0b<\/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=\"\">    @Data\n    public class InstanceRequest {\n    \tprivate String vSwitchId;\n    }<\/pre>\n\n\n\n<p><br>\u7136\u540e\u5728 Controller \u4e2d\u4f7f\u7528\u8fd9\u4e2a\u5bf9\u8c61\u4f5c\u4e3a @RequestBody \u6765\u83b7\u5f97\u8bf7\u6c42\u4f53\uff0c\u5e76\u5728\u5904\u7406\u903b\u8f91\u4e2d\u8f93\u51fa\u00a0<code>vSwitchId<\/code>\u5b57\u6bb5<\/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=\"\">public class InstanceController {\n    @RequestMapping(\"\/createInstance\")\n\tpublic String createInstance(@RequestBody InstanceRequest request) {\n        \/\/ do something\n        System.out.println(request.getVSwitchId());\n        return \"success\";\n}\n<\/pre>\n\n\n\n<p>\u8fd0\u884c\u4e0a\u8ff0\u5e94\u7528\u540e\uff0c\u6211\u4fe1\u5fc3\u6ee1\u6ee1\u7684\u53d1\u9001\u4e00\u4e2a HTTP \u8bf7\u6c42\u8fdb\u884c\u6d4b\u8bd5\uff0c\u5145\u6ee1\u4fe1\u5fc3\u5730\u8ba4\u4e3a\u63a7\u5236\u53f0\u91cc\u4f1a\u6253\u5370\u6211\u4f20\u8fc7\u53bb\u7684\u4fe1\u606f<\/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=\"\">POST \/createInstance HTTP\/1.1\nContent-Type: application\/json\n \n{\n\t\"vSwitchId\": \"xxxx\"\n}<\/pre>\n\n\n\n<p>\u7ed3\u679c\u5374\u53d1\u73b0\uff0c\u63a7\u5236\u53f0\u8f93\u51fa\u4e86\u4e00\u4e2a\u5927\u5927\u7684 null\u3002\u3002\u4e00\u8138\u61f5\u903c\uff0c\u6211\u9010\u5b57\u5bf9\u6bd4\u81ea\u5df1\u53d1\u9001\u7684 JSON \u5b57\u6bb5\u540d\u548c\u7c7b\u91cc\u9762\u7684\u5b57\u6bb5\u540d\u3002\u3002v\u2026S\u2026w\u2026i\u2026t\u2026c\u2026h\u2026I\u2026d\u2026 \u6ca1\u95ee\u9898\u5440\uff0c\u4e00\u4e2a\u5b57\u6bcd\u90fd\u4e0d\u5dee\u5440\uff0c\u4e3a\u4ec0\u4e48\u6536\u4e0d\u5230\u5462\uff1f<\/p>\n\n\n\n<p>vSwitchId\u5b57\u6bb5\u4e3a\u4ec0\u4e48\u6ca1\u6709\u6210\u529f\u89e3\u6790\u5230\uff1f\u6211\u4eec\u77e5\u9053 Spring \u662f\u901a\u8fc7 jackson \u6846\u67b6\u6765\u8fdb\u884c\u5e8f\u5217\u5316\u548c\u53cd\u5e8f\u5217\u5316\u7684\uff0c\u56e0\u6b64\u9700\u8981\u6df1\u5165 jackson \u7684\u6e90\u7801\uff0c\u770b\u770b\u4e3a\u4ec0\u4e48\u8fd9\u4e2a\u5b57\u6bb5\u6ca1\u6709\u88ab\u6210\u529f\u53cd\u5e8f\u5217\u5316\u3002<\/p>\n\n\n\n<p><strong>\u6df1\u5165 Jackson \u6e90\u7801\u63a2\u7a76\u539f\u56e0<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><br>Jackon \u4e2d\uff0c\u4e3b\u8981\u901a\u8fc7<code>AbstractJackson2HttpMessageConverter.readJavaType<\/code>\u65b9\u6cd5\u5c06 HTTP \u8bf7\u6c42\u4e2d\u7684\u6d88\u606f\u4f53\u8f6c\u6362\u4e3a\u5bf9\u8c61\uff0c\u56e0\u6b64\u76f4\u63a5\u5bf9\u5176\u6253\u65ad\u70b9\u8fdb\u884c\u8c03\u8bd5<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-86-1024x257.png\" alt=\"\" class=\"wp-image-11772\" width=\"545\" height=\"136\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-86-1024x257.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-86-300x75.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-86-768x193.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-86-830x208.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-86-230x58.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-86-350x88.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-86-480x121.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-86.png 1434w\" sizes=\"(max-width: 545px) 100vw, 545px\" \/><\/figure><\/div>\n\n\n\n<p>\u6839\u636e\u65ad\u70b9\u9010\u6b65\u63a8\u8fdb\uff0c\u8fdb\u5165\u00a0<code>ObjectMapper._readMapAndClose<\/code>\u65b9\u6cd5<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-87-1024x566.png\" alt=\"\" class=\"wp-image-11773\" width=\"559\" height=\"309\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-87-1024x566.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-87-300x166.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-87-768x425.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-87-830x459.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-87-230x127.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-87-350x194.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-87-480x265.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-87.png 1418w\" sizes=\"(max-width: 559px) 100vw, 559px\" \/><\/figure><\/div>\n\n\n\n<p>\u770b\u5230\u8fd9\u91cc\u6709 _findRootDeserializer\u65b9\u6cd5\uff0c\u987e\u540d\u601d\u4e49\uff0c\u5e94\u8be5\u662f\u6839\u636e\u5f53\u524d\u60f3\u8981\u8f6c\u6362\u7684\u5bf9\u8c61\u7c7b\u578b\uff0c\u6765\u5bfb\u627e\u5bf9\u5e94\u7684\u53cd\u5e8f\u5217\u5316\u5668\u4e86\u3002\u90a3\u4e48\u7ee7\u7eed\u8fdb\u53bb\u770b\u770b\u2026<\/p>\n\n\n\n<p>\u5f80\u4e0b\u5c42\u5c42\u9012\u8fdb\u540e\uff0c\u627e\u5230\u521b\u5efa\u53cd\u5e8f\u5217\u5316\u5668\u7684\u5730\u65b9\uff0c\u5728 DeserializerCache.createDeserializer\u91cc\uff0c\u4e5f\u5c31\u662f\u8bf4\u662f\u5728 DeseializerCache \u91cc\u9762\u6267\u884c\u521b\u5efa\u7684\u6b65\u9aa4\uff0c\u8fd9\u5176\u5b9e\u662f\u5f88\u5e38\u89c1\u7684 \u7f13\u5b58+\u61d2\u52a0\u8f7d \u6a21\u5f0f\uff1a\u8981\u4f7f\u7528\u7684\u65f6\u5019\uff0c\u9996\u5148\u53bb\u7f13\u5b58\u91cc\u9762\u62ff\uff0c\u62ff\u4e0d\u5230\u7684\u65f6\u5019\u518d\u521b\u5efa\uff0c\u521b\u5efa\u5b8c\u76f4\u63a5\u52a0\u5165\u7f13\u5b58\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:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-88-1024x549.png\" alt=\"\" class=\"wp-image-11774\" width=\"559\" height=\"299\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-88-1024x549.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-88-300x161.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-88-768x412.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-88-830x445.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-88-230x123.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-88-350x188.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-88-480x257.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-88.png 1436w\" sizes=\"(max-width: 559px) 100vw, 559px\" \/><\/figure><\/div>\n\n\n\n<p>\u5728\u521b\u5efa\u53cd\u5e8f\u5217\u5316\u5668\u7684\u65b9\u6cd5\u91cc\uff0c\u6709\u4e2a\u00a0<code>BeanDescription<\/code>\u7c7b\u503c\u5f97\u6ce8\u610f\uff0c\u5b83\u6307\u7684\u662f\u7c7b\u7684\u63cf\u8ff0\uff0c\u56e0\u6b64\u731c\u6d4b\u5728\u8fd9\u4e2a\u7c7b\u91cc\u9762\uff0c\u6211\u4eec\u7684 POJO \u7c7b\u7684\u5b57\u6bb5\u5e94\u8be5\u5df2\u7ecf\u88ab\u5206\u6790\u5b8c\u6bd5\u4e86\uff0c\u90a3\u4e48\u4e0a\u9762\u7684 vSwitchId \u5230\u5e95\u88ab\u5206\u6790\u6210\u4e86\u5565\uff0c\u4e5f\u53ef\u4ee5\u5728\u91cc\u9762\u770b\u5230\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:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-89-1024x818.png\" alt=\"\" class=\"wp-image-11775\" width=\"571\" height=\"456\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-89-1024x818.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-89-300x240.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-89-768x613.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-89-830x663.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-89-230x184.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-89-350x280.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-89-480x383.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-89.png 1332w\" sizes=\"(max-width: 571px) 100vw, 571px\" \/><\/figure><\/div>\n\n\n\n<p>\u8be5\u7c7b\u91cc\u9762\u6709 POJOPropertiesCollector \uff0c\u90a3\u4e48\u6211\u4eec POJO \u7c7b\u7684\u5b57\u6bb5\u5e94\u8be5\u662f\u88ab\u6536\u96c6\u5728\u8fd9\u4e2a\u7c7b\u91cc\u9762\u4e86\u3002<\/p>\n\n\n\n<p>\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u8fd9\u662f\u4e00\u4e2a\u61d2\u52a0\u8f7d\u7684\u7c7b\uff0c\u5185\u90e8\u7684\u5206\u6790\u903b\u8f91\u53ea\u6709\u5728\u7b2c\u4e00\u6b21\u88ab\u7528\u5230\u65f6\u624d\u4f1a\u6267\u884c\u3002\u5206\u6790\u903b\u8f91\u5728 POJOPropertiesCollector.collecAll()\u8fd9\u4e2a\u65b9\u6cd5\u91cc\u9762\u3002<\/p>\n\n\n\n<p>\u4e0b\u9762\u91cd\u70b9\u5c31\u6765\u4e86\uff0c\u770b\u770b\u8fd9\u4e2a\u65b9\u6cd5<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"414\" src=\"http:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-90-1024x414.png\" alt=\"\" class=\"wp-image-11776\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-90-1024x414.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-90-300x121.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-90-768x310.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-90-830x335.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-90-230x93.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-90-350x141.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-90-480x194.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-90.png 1450w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><br><\/p>\n\n\n\n<p>\u65b9\u6cd5\u4e3b\u8981\u903b\u8f91\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ul><li>\u9996\u5148\u521d\u59cb\u5316\u4e86 props\uff0c\u5b58\u50a8\u6240\u6709\u53cd\u5e8f\u5217\u5316\u8fc7\u7a0b\u4e2d\u9700\u8981\u7684\u5c5e\u6027<\/li><li>\u901a\u8fc7addFields(props)\u65b9\u6cd5\u4ece\u7c7b\u7684\u5b57\u6bb5\u4e2d\u62bd\u53d6\u5c5e\u6027\u5e76\u52a0\u5165 props \u4e2d <\/li><li>\u901a\u8fc7_addMethods(props)\u65b9\u6cd5\u4ece\u7c7b\u7684 getter \u548c setter \u5b57\u6bb5\u4e2d\u62bd\u53d6\u5c5e\u6027\u5e76\u52a0\u5165 props \u4e2d <\/li><li>\u901a\u8fc7 _removeUnwantedProperties(props)\u65b9\u6cd5\u4ece props \u4e2d\u5254\u9664\u6389\u4e0d\u60f3\u8981\u7684\u5c5e\u6027\u3002\u54ea\u4e9b\u5c5e\u6027\u4f1a\u88ab\u5254\u9664\uff1f\u4ece\u4ee3\u7801\u53ef\u4ee5\u770b\u51fa\uff0c\u5b57\u6bb5\u3001getter\u3001setter \u90fd\u662f\u79c1\u6709\u5c5e\u6027\u3001\u6216\u8005\u5df2\u7ecf\u88ab\u6807\u8bb0\u4e3a ignore \u7684\u5c5e\u6027\uff0c\u662f\u9700\u8981\u88ab\u5254\u9664\u7684\u3002<\/li><\/ul>\n\n\n\n<p>\u901a\u8fc7\u8c03\u8bd5\u53d1\u73b0\uff0c\u6267\u884c\u5b8c\u00a0<code>_addFields<\/code>\u00a0\u540e\uff0c<code>vSwitchId<\/code>\u5b57\u6bb5\u6210\u529f\u52a0\u5165<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"62\" src=\"http:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-91-1024x62.png\" alt=\"\" class=\"wp-image-11777\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-91-1024x62.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-91-300x18.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-91-768x46.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-91-830x50.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-91-230x14.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-91-350x21.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-91-480x29.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-91.png 1422w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u518d\u6267\u884c\u5b8c\u00a0<code>_addMethods(props)<\/code>\u540e\uff0c\u795e\u5947\u7684\u4e8b\u60c5\u53d1\u751f\u4e86\uff0c\u52a0\u5165\u4e86\u53e6\u5916\u4e00\u4e2a props\u00a0<code>vswitchId<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"74\" src=\"http:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-92-1024x74.png\" alt=\"\" class=\"wp-image-11778\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-92-1024x74.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-92-300x22.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-92-768x55.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-92-830x60.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-92-230x17.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-92-350x25.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-92-480x35.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-92.png 1472w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u63a5\u4e0b\u6765\uff0c\u6267\u884c\u00a0<code>_removeUnwantedProperties(props)<\/code>\u4e4b\u540e<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"47\" src=\"http:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-93-1024x47.png\" alt=\"\" class=\"wp-image-11779\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-93-1024x47.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-93-300x14.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-93-768x35.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-93-830x38.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-93-230x11.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-93-350x16.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-93-480x22.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-93.png 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u53d1\u73b0 vSwitchId\u8fd9\u4e2a\u6b63\u786e\u7684\u5c5e\u6027\u5df2\u7ecf\u88ab\u5254\u9664\u4e86\uff0c\u53cd\u800c\u7559\u4e0b\u4e86 vswitchId\u8fd9\u4e2a\u6709\u95ee\u9898\u7684\u5c5e\u6027\u3002\u8fd9\u662f\u4e3a\u4ec0\u4e48\u5462\uff1f\u4e0a\u9762\u63d0\u5230\uff0c_removeUnwantedProperties\u4f1a\u5254\u9664\u79c1\u6709\u7684\u5c5e\u6027\uff0cvSwitchId\u8fd9\u4e2a props \u662f\u6765\u81ea\u5b57\u6bb5\u7684\uff0c\u800c\u5b57\u6bb5\u672c\u8eab\u662f\u79c1\u6709\u7684\uff0c\u56e0\u6b64\u5b83\u88ab\u5254\u9664\u4e86\u3002<\/p>\n\n\n\n<p>\u63a5\u4e0b\u6765\u6211\u4eec\u9700\u8981\u641e\u6e05\u695a\u4e3a\u4ec0\u4e48\u4ece getter\u3001setter \u4e2d\u62ff\u5230\u7684\u5c5e\u6027\u662f vswitchId\u800c\u4e0d\u662f vSwitchId\u3002<\/p>\n\n\n\n<p>\u9996\u5148\uff0cgetter \u548c setter \u662f\u54ea\u91cc\u6765\u7684\uff1f\u9879\u76ee\u4e2d\u6211\u4f7f\u7528\u7684 Lombok\uff0c\u4e5f\u5c31\u662f\u8bf4 getter \u548c setter \u662f\u7531 Lombok \u751f\u6210\u7684\u3002\u5728\u5927\u591a\u6570 IDE \u4e2d\uff0c\u5982\u679c\u4f7f\u7528 Lombok \u751f\u6210 setter \u65b9\u6cd5\uff0c\u5b83\u5c06\u4f1a\u88ab\u81ea\u52a8\u9690\u85cf\u5e76\u4e0d\u4f1a\u663e\u793a\u5728\u6e90\u4ee3\u7801\u4e2d\u3002\u5982\u679c\u60f3\u8981\u67e5\u770b\u751f\u6210\u7684\u65b9\u6cd5\u540d\u79f0\uff0c\u901a\u5e38 IDE \u4f1a\u63d0\u4f9b\u4e00\u4e2a\u53eb\u505a\u201cStructure\u201d\uff08\u7ed3\u6784\uff09\u6216\u201cOutline\u201d\uff08\u5927\u7eb2\uff09\u7684\u529f\u80fd\uff0c\u5b83\u53ef\u4ee5\u5217\u51fa\u7c7b\u7684\u6240\u6709\u6210\u5458\u53d8\u91cf\u548c\u65b9\u6cd5\uff0c\u5176\u4e2d\u4e5f\u5305\u62ec\u7531 Lombok \u751f\u6210\u7684 setter \u65b9\u6cd5\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:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-94-757x1024.png\" alt=\"\" class=\"wp-image-11780\" width=\"435\" height=\"588\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-94-757x1024.png 757w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-94-222x300.png 222w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-94-768x1039.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-94-830x1123.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-94-230x311.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-94-350x474.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-94-480x650.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-94.png 962w\" sizes=\"(max-width: 435px) 100vw, 435px\" \/><\/figure><\/div>\n\n\n\n<p><br><\/p>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230 get \u548c set \u65b9\u6cd5\u7684\u540d\u79f0\u5206\u522b\u662f getVSwitchId\u548c setVSwitchId\u3002\u63a5\u4e0b\u6765\u770b\u770b Jackson \u5177\u4f53\u662f\u5982\u4f55\u89e3\u6790\u65b9\u6cd5\uff0c\u4ece\u800c\u5f97\u5230 props \u7684\u3002\u76f8\u5173\u4ee3\u7801\u5728 DefaultAccessorNamingStrategy.legacyManglePropertyName\u4e2d<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-95-1024x844.png\" alt=\"\" class=\"wp-image-11781\" width=\"523\" height=\"431\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-95-1024x844.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-95-300x247.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-95-768x633.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-95-830x684.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-95-230x190.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-95-350x289.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-95-480x396.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-95.png 1528w\" sizes=\"(max-width: 523px) 100vw, 523px\" \/><\/figure><\/div>\n\n\n\n<p><br><\/p>\n\n\n\n<p>\u4ee5\u4e0a\u5904\u7406\u6d41\u7a0b\u7528\u5927\u767d\u8bdd\u89e3\u91ca\u4e00\u4e0b\uff1a\u9996\u5148\u4f1a\u6839\u636e offset\u5b57\u6bb5\u53bb\u9664\u524d\u9762\u7684\u4e09\u4e2a\u5b57\u6bcd\uff0c\u4e00\u822c\u4e3a get \u6216 set\u3002\u53bb\u9664\u524d\u9762\u4e09\u4e2a\u5b57\u6bcd &#8216;set&#8217; \u540e\uff0c\u53d1\u73b0\u7b2c\u4e00\u4e2a\u5b57\u6bcd\u662f\u5927\u5199\u7684\uff0c\u56e0\u6b64\u5c06\u7b2c\u4e00\u4e2a\u5b57\u6bcd\u5c0f\u5199\uff0c\u7136\u540e\u63a5\u7740\u5f80\u540e\u627e\uff0c\u5982\u679c\u540e\u9762\u7684\u8fd8\u662f\u5927\u5199\uff0c\u63a5\u7740\u53d8\u5c0f\u5199\u2026\u76f4\u5230\u627e\u5230\u4e86\u4e00\u4e2a\u672c\u6765\u5c31\u662f\u5c0f\u5199\u7684\u5b57\u6bcd\u540e\uff0c\u624d\u5c06\u540e\u9762\u6240\u6709\u7684\u5b57\u6bcd\u4e00\u80a1\u8111\u6dfb\u52a0\u8fdb\u6765\u3002\u7531\u4e8e setVSwitchId\u5728\u53bb\u9664\u524d\u9762\u7684 set \u540e\uff0c\u524d\u9762\u4e24\u4e2a\u5b57\u6bcd\u90fd\u662f\u5927\u5199\uff0c\u56e0\u6b64\u5728\u8fd9\u79cd\u5904\u7406\u903b\u8f91\u4e0b\uff0c\u6700\u540e\u5f97\u5230\u7684\u5c5e\u6027\u540d\u4e3a vswitchId\u3002\u6362\u53e5\u8bdd\u8bf4\uff0c\u5982\u679c set \u65b9\u6cd5\u7684\u540d\u79f0\u662f setvSwitchId\uff0c\u90a3\u4e48\u5904\u7406\u540e\u5f97\u5230\u7684\u5c31\u662f\u6b63\u786e\u7684 vSwitchId\u3002<\/p>\n\n\n\n<p>\u8bf4\u5230\u8fd9\u91cc\uff0c\u95ee\u9898\u5176\u5b9e\u5c31\u660e\u4e86\u4e86\uff0c\u8fd9\u4e2a\u5176\u5b9e\u662f\u7531\u4e8e Lombok \u751f\u6210 getter\u3001setter \u65b9\u6cd5\u7684\u8bed\u4e49\u89c4\u8303\u4e0e Jackson \u5904\u7406 get set \u65b9\u6cd5\u4e4b\u95f4\u7684\u4e0d\u4e00\u81f4\u6027\uff0c\u5bfc\u81f4\u7684\u5c5e\u6027\u540d\u65e0\u6cd5\u5339\u914d\u4e0a\u7684\u95ee\u9898\u3002<\/p>\n\n\n\n<p><strong>Lombok<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><br><\/p>\n\n\n\n<p>\u5176\u5b9e\u5728 Lombok \u793e\u533a\u91cc\uff0c\u4e5f\u6709\u4eba\u63d0\u51fa\u8fc7\u8fd9\u4e2a\u95ee\u9898\uff0c\u8be6\u89c1 Change lombok&#8217;s property capitalization code. <code>Field xName<\/code> -&gt; <code>getxName()<\/code>. \u00b7 Issue #2693 \u00b7 projectlombok\/lombok \u00b7 GitHub\u3002<\/p>\n\n\n\n<p>\u53ef\u4ee5\u770b\u51fa\uff0c\u8fd9\u4e2a\u5176\u5b9e\u662f\u89c4\u8303\u7684\u95ee\u9898\uff0c\u76ee\u524d\u6ca1\u6709\u4e00\u4e2a\u5b9a\u8bba\u3002\u3002Lombok \u8ba4\u4e3a\u81ea\u5df1\u751f\u6210 set\u3001get \u65b9\u6cd5\u7684\u89c4\u8303\u6ca1\u6709\u95ee\u9898\uff0cJackson \u90a3\u8fb9\u4e5f\u8ba4\u4e3a\u81ea\u5df1\u6839\u636e set\u3001get \u65b9\u6cd5\u6765\u89e3\u6790\u5b57\u6bb5\u540d\u7684\u89c4\u8303\u4e5f\u6ca1\u6709\u95ee\u9898\uff0c\u516c\u8bf4\u516c\u6709\u7406\uff0c\u5a46\u8bf4\u5a46\u6709\u7406\u3002\u3002\u4e0d\u8fc7\uff0c\u4e0d\u7ba1\u662f\u8c01\u6709\u7406\uff0c\u6700\u540e\u53d7\u5230\u4f24\u5bb3\u7684\u662f\u6211\u4eec\u5f00\u53d1\u8005\u5440\uff0c\u53ea\u8981\u4f60\u7684\u9879\u76ee\u4e2d\u540c\u65f6\u7528\u5230\u4e86 Lombok \u548c Jackson\uff0c\u5c31\u4f1a\u9047\u5230\u8fd9\u4e2a\u95ee\u9898\u3002\u5bf9\u4e8e\u6ca1\u6709\u63a5\u89e6\u8fc7\u8fd9\u4e2a\u95ee\u9898\u7684\u5f00\u53d1\u8005\u6765\u8bf4\uff0c\u8fd9\u4e2a\u95ee\u9898\u5176\u5b9e\u662f\u4f1a\u5e73\u767d\u65e0\u6545\u6d6a\u8d39\u5f88\u591a\u65f6\u95f4\u7684\u3002<\/p>\n\n\n\n<p>\u4e0d\u8fc7\uff0cLombok \u793e\u533a\u8fd8\u662f\u63d0\u51fa\u4e86\u4e00\u4e2a PR \u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u8be6\u89c1 [Fix for #2693] Adding a new accessors flag &#8211; javaBeansSpecCapitalization by YonatanSherwin \u00b7 Pull Request #2996 \u00b7 projectlombok\/lombok \u00b7 GitHub \u3002<\/p>\n\n\n\n<p>\u5728\u4ee5\u4e0a PR \u4e2d\uff0cLombok \u793e\u533a\u63d0\u4f9b\u4e86\u4e00\u4e2a\u914d\u7f6e\u9879\uff0c<\/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=\"\">lombok.accessors.capitalization = [basic | beanspec] (default: basic)<\/pre>\n\n\n\n<p>\u9ed8\u8ba4\u4e3a basic\uff0c\u4e5f\u5c31\u662f Lombok \u9ed8\u8ba4\u7684\u884c\u4e3a\uff0c\u4f1a\u751f\u6210 setVSwitchId\u8fd9\u79cd\u65b9\u6cd5\u540d\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u5c06\u5176\u4fee\u6539\u4e3a beanspec\uff0c\u90a3\u4e48\u4f1a\u4fdd\u6301\u4e0e Spring\u3001Jackson \u76f8\u540c\u7684\u89c4\u8303\uff0c \u6b64\u65f6\u4f1a\u751f\u6210 setvSwitchId\u8fd9\u79cd\u65b9\u6cd5\u540d\u3002<\/p>\n\n\n\n<p>\u8be6\u60c5\u4e5f\u53ef\u4ee5\u770b Lombok \u7684\u5b98\u65b9\u6587\u6863 @Getter and @Setter<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-96-1024x756.png\" alt=\"\" class=\"wp-image-11782\" width=\"478\" height=\"353\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-96-1024x756.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-96-300x222.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-96-768x567.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-96-830x613.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-96-230x170.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-96-350x259.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-96-480x355.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/08\/\u56fe\u7247-96.png 1270w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><\/figure><\/div>\n\n\n\n<p><br><\/p>\n\n\n\n<p>\u5176\u4e2d\u6700\u540e\u4e00\u53e5\u8bdd\u5f88\u6709\u610f\u601d\uff0c\u201cBoth strategies are commonly used in the java ecosystem, though beanspec is more common\u201c\u3002\u8fd9\u610f\u601d\u662f\uff0c\u201c\u6211\u627f\u8ba4 Jackson \u90a3\u8fb9\u4f7f\u7528\u7684\u89c4\u8303\u66f4\u5e38\u7528\u4e00\u4e9b\uff0c\u4f46\u662f\u6211\u9ed8\u8ba4\u8fd8\u662f\u8981\u575a\u6301\u6211\u7684\u89c4\u8303\u2026\u201d\u3002<\/p>\n\n\n\n<p id=\"\u89e3\u51b3\u65b9\u6848\"><strong>\u89e3\u51b3\u65b9\u6848<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u8bb2\u5230\u8fd9\u91cc\uff0c\u89e3\u51b3\u65b9\u6848\u5176\u5b9e\u5c31\u51fa\u6765\u4e86\u3002\u8fd9\u91cc\u4ecb\u7ecd\u4e09\u79cd\u89e3\u51b3\u65b9\u6848\u5427<br><\/p>\n\n\n\n<p><strong>\u65b9\u6848\u4e00<\/strong><\/p>\n\n\n\n<p>\u4f7f\u7528 Lombok \u7684\u914d\u7f6e\u6765\u89e3\u51b3\u3002\u5728\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u521b\u5efa\u00a0<code>lombok.config<\/code>\u6587\u4ef6\uff0c\u5e76\u6dfb\u52a0\u4ee5\u4e0b\u914d\u7f6e\u9879\u5373\u53ef<\/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=\"\">lombok.accessors.capitalization = beanspec<\/pre>\n\n\n\n<p id=\"\u65b9\u6848\u4e8c\"><strong>\u65b9\u6848\u4e8c<\/strong><\/p>\n\n\n\n<p>\u5229\u7528 IDE\u3001\u6216\u8005\u624b\u52a8\u751f\u6210 getter\u3001setter \u65b9\u6cd5<\/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=\"\">    public String getvSwitchId() {\n        return vSwitchId;\n    }\n     \n    public void setvSwitchId(String vSwitchId) {\n        this.vSwitchId = vSwitchId;\n    }<\/pre>\n\n\n\n<p id=\"\u65b9\u6848\u4e09\"><strong>\u65b9\u6848\u4e09<\/strong><\/p>\n\n\n\n<p>\u5229\u7528 Jackson \u7684 JsonProperty \u6ce8\u89e3\u5f3a\u884c\u6307\u5b9a\u5c5e\u6027\u540d<\/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=\"\">@Data\npublic class InstanceRequest {\n    @JsonProperty(value = \"vSwitchId\")\n\tprivate String vSwitchId;\n}<\/pre>\n\n\n\n<p><strong>\u603b\u7ed3<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u6211\u81ea\u5df1\u4ece\u8fd9\u4e2a\u4e8b\u4ef6\u4e2d\u603b\u7ed3\u51fa\u6765\u4e86\u4e00\u70b9\u7ecf\u9a8c\u3002\u5728 Java \u91cc\u9762\uff0c\u7ed9\u7c7b\u5c5e\u6027\u53d6\u540d\u7684\u65f6\u5019\uff0c\u4ee5\u524d\u6211\u60f3\u7740\u662f\u53ea\u8981\u6ee1\u8db3\u5c0f\u9a7c\u5cf0\u547d\u540d\u6cd5\u5c31\u4e07\u4e8b\u5927\u5409\uff0c\u4e0d\u4f1a\u6709\u4ec0\u4e48\u95ee\u9898\u4e86\u3002\u3002\u3002\u73b0\u5728\u6211\u77e5\u9053\u4e86\uff0c\u5e76\u4e0d\u662f\u8bf4\u6ee1\u8db3\u5c0f\u9a7c\u5cf0\u5c31\u4e07\u4e8b\u5927\u5409\u4e86\uff0c\u5982\u679c\u78b0\u5230 \u9996\u5b57\u6bcd\u5c0f\u5199\u3001\u7b2c\u4e8c\u4e2a\u5b57\u6bcd\u5927\u5199 \u7684\u8fd9\u79cd\u60c5\u51b5\uff0c\u8fd8\u662f\u8981\u7279\u522b\u6ce8\u610f\uff0c\u5c24\u5176\u662f\u5f53\u8fd9\u4e2a\u7c7b\u8fd8\u88ab\u7528\u4e8e\u5e8f\u5217\u5316\/\u53cd\u5e8f\u5217\u5316\u65f6\uff0c\u4e00\u5b9a\u8981\u6ce8\u610f\u5176\u5904\u7406\u7684\u89c4\u8303\u6027\uff0c\u8981\u5199\uff08\u751f\u6210\uff09\u751f\u6210\u7b26\u5408 Java Bean \u89c4\u8303\u7684 set\u3001get \u65b9\u6cd5\uff0c\u5426\u5219\u8fd9\u4e2a\u5c0f\u5c0f\u7684\u5b57\u6bb5\u5728\u53cd\u5e8f\u5217\u5316\u65f6\u4f1a\u4e00\u76f4\u56f0\u6270\u7740\u4f60\u3002\u3002\u8ba9\u4f60\u4e00\u76f4\u6293\u72c2 \u201c\u8fd9\u4e2a\u5b57\u6bb5\u6211\u660e\u660e\u4f20\u4e86\u5440\uff0c\u4e3a\u4ec0\u4e48 Spring \u5c31\u662f\u6536\u4e0d\u5230\u201d\u3002<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u95ee\u9898\u73b0\u8c61 vSwitchId\u3001uShape\u3001iPhone\u2026 \u8fd9\u7c7b\u5b57\u6bb5\u540d\uff0c\u6709\u4ec0\u4e48\u7279\u70b9\uff1f\u5f88\u5bb9\u6613\u770b\u51fa\u6765\u5427\uff0c\u9996\u5b57\u6bcd\u5c0f\u5199 [&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\/11771"}],"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=11771"}],"version-history":[{"count":1,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/11771\/revisions"}],"predecessor-version":[{"id":11783,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/11771\/revisions\/11783"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11771"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11771"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11771"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}