{"id":15854,"date":"2024-07-10T16:12:24","date_gmt":"2024-07-10T08:12:24","guid":{"rendered":"https:\/\/92it.top\/?p=15854"},"modified":"2024-07-10T16:12:24","modified_gmt":"2024-07-10T08:12:24","slug":"%e5%8f%8d%e5%b0%84%ef%bc%9a%e8%ae%a9%e4%bd%a0%e6%9b%b4%e4%bc%98%e9%9b%85%e7%9a%84%e4%bd%bf%e7%94%a8%e6%a1%86%e6%9e%b6%ef%bc%81","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=15854","title":{"rendered":"\u53cd\u5c04\uff1a\u8ba9\u4f60\u66f4\u4f18\u96c5\u7684\u4f7f\u7528\u6846\u67b6\uff01"},"content":{"rendered":"\n<p>\u8f6c\u8f7d\uff1a<a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzIwNDAyOTI2Nw==&amp;mid=2247496912&amp;idx=1&amp;sn=5750a490184a50dcbb0717839f3b0730&amp;chksm=96c4d8eca1b351fa22caa825a06f444b9319f15c63e64403a4e26fb812da458eb2f9d51ab04c&amp;scene=178&amp;cur_album_id=2818595943724974083#rd\">\u53cd\u5c04\uff1a\u8ba9\u4f60\u66f4\u4f18\u96c5\u7684\u4f7f\u7528\u6846\u67b6\uff01<\/a><\/p>\n\n\n\n<p>\u5728 Java\u8bed\u8a00\u4e2d\uff0c\u53cd\u5c04\u662f\u4e00\u79cd\u5f3a\u5927\u800c\u4f18\u79c0\u7684\u673a\u5236\uff0c\u901a\u8fc7\u53cd\u5c04\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u8fd0\u884c\u65f6\u68c0\u67e5\u548c\u4fee\u6539\u7c7b\u3001\u63a5\u53e3\u3001\u5b57\u6bb5\u548c\u65b9\u6cd5\u7684\u4fe1\u606f\uff0c\u751a\u81f3\u52a8\u6001\u5730\u521b\u5efa\u5bf9\u8c61\u3001\u8c03\u7528\u65b9\u6cd5\u548c\u8bbf\u95ee\u79c1\u6709\u6210\u5458\u3002<\/p>\n\n\n\n<p>\u53ef\u4ee5\u6beb\u4e0d\u5938\u5f20\u5730\u8bf4\uff0c\u6ca1\u6709\u53cd\u5c04\uff0c\u5f88\u591a\u4f18\u79c0\u7684\u6846\u67b6\u4e0d\u590d\u5b58\u5728\uff0c\u6ca1\u6709\u8fd9\u4e9b\u4f18\u79c0\u7684\u6846\u67b6\uff08\u6bd4\u5982Spring\uff09\uff0cJava\u53ef\u80fd\u4f1a\u900a\u8272\u5f88\u591a\uff0c\u56e0\u6b64\uff0c\u8fd9\u7bc7\u6587\u7ae0\uff0c\u6211\u4eec\u4e00\u8d77\u6765\u6df1\u5165\u63a2\u8ba8Java\u53cd\u5c04\u4ee5\u53ca\u5176\u80cc\u540e\u7684\u539f\u7406\u3002<\/p>\n\n\n\n<p><strong>\u4e00\u3001\u4ec0\u4e48\u662f\u53cd\u5c04\u00a0<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5148\u770b\u770b Oracle\u5b98\u65b9\u5bf9java\u53cd\u5c04\u7684\u8bf4\u660e\uff1a<\/p>\n\n\n\n<p>Reflection enables Java code to discover information about the fields, methods and constructors of loaded classes, and to use reflected fields, methods, and constructors to operate on their underlying counterparts, within security restrictions. The API accommodates applications that need access to either the public members of a target object (based on its runtime class) or the members declared by a given class. It also allows programs to suppress default reflective access control.<\/p>\n\n\n\n<p>Java \u7684\u53cd\u5c04\u673a\u5236\u662f\u6307\u5728\u8fd0\u884c\u72b6\u6001\u4e2d\uff0c\u5bf9\u4e8e\u4efb\u610f\u4e00\u4e2a\u7c7b\u90fd\u80fd\u591f\u77e5\u9053\u8fd9\u4e2a\u7c7b\u6240\u6709\u7684\u5c5e\u6027\u548c\u65b9\u6cd5\uff1b\u5e76\u4e14\u5bf9\u4e8e\u4efb\u610f\u4e00\u4e2a\u5bf9\u8c61\uff0c\u90fd\u80fd\u591f\u8c03\u7528\u5b83\u7684\u4efb\u610f\u4e00\u4e2a\u65b9\u6cd5\uff1b\u8fd9\u79cd\u52a8\u6001\u83b7\u53d6\u4fe1\u606f\u4ee5\u53ca\u52a8\u6001\u8c03\u7528\u5bf9\u8c61\u65b9\u6cd5\u7684\u529f\u80fd\u6210\u4e3aJava\u8bed\u8a00\u7684\u53cd\u5c04\u673a\u5236\u3002<\/p>\n\n\n\n<p>\u5b83\u662f\u901a\u8fc7 Java\u53cd\u5c04 API \u6765\u5b9e\u73b0\uff0c\u5176\u4e2d\u6700\u6838\u5fc3\u7684\u7c7b\u4f4d\u4e8e java.lang.reflect \u5305\u4e0b\uff0c\u5982 Class\u3001Constructor\u3001Field \u548c Method\u7b49\uff0c\u8fd9\u4e9b\u7c7b\u63d0\u4f9b\u4e86\u5bf9\u7c7b\u548c\u5bf9\u8c61\u7684\u8fd0\u884c\u65f6\u4fe1\u606f\u8fdb\u884c\u68c0\u67e5\u548c\u64cd\u4f5c\u7684\u65b9\u6cd5\u3002\u5982\u4e0b\u56fe\uff0c\u5c55\u793a\u4e86 JDK\u6e90\u7801\u4e2d java.lang.reflect \u5305\u6240\u6709\u7684\u7c7b\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"811\" height=\"1024\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-70-811x1024.png\" alt=\"\" class=\"wp-image-15856\" style=\"width:450px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-70-811x1024.png 811w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-70-238x300.png 238w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-70-768x970.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-70-1217x1536.png 1217w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-70-830x1048.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-70-230x290.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-70-350x442.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-70-480x606.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-70.png 1272w\" sizes=\"(max-width: 811px) 100vw, 811px\" \/><\/figure><\/div>\n\n\n<p><strong>\u4e8c\u3001\u53cd\u5c04\u7684\u539f\u7406\u00a0<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u53cd\u5c04\u7684\u539f\u7406\u4e3b\u8981\u53ef\u4ee5\u4ece\u4e0b\u9762 4\u4e2a\u70b9\u6765\u9610\u8ff0\uff1a<\/p>\n\n\n\n<ol>\n<li>\u7c7b\u52a0\u8f7d\uff1a\u5f53 Java\u7a0b\u5e8f\u8fd0\u884c\u65f6\uff0c\u7c7b\u52a0\u8f7d\u5668\u4f1a\u6839\u636e\u7c7b\u7684\u540d\u79f0\u67e5\u627e\u5e76\u52a0\u8f7d\u7c7b\u7684\u5b57\u8282\u7801\u6587\u4ef6\uff0c\u7136\u540e\u5c06\u5b57\u8282\u7801\u6587\u4ef6\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u7684 Java\u7c7b\uff0c\u5e76\u5c06\u5176\u5b58\u50a8\u5728\u8fd0\u884c\u65f6\u6570\u636e\u533a\u57df\u7684\u65b9\u6cd5\u533a\u4e2d\u3002<\/li>\n\n\n\n<li>\u521b\u5efa Class\u5bf9\u8c61\uff1a\u5728\u7c7b\u52a0\u8f7d\u8fc7\u7a0b\u4e2d\uff0cJava\u865a\u62df\u673a\u4f1a\u81ea\u52a8\u521b\u5efa\u5bf9\u5e94\u7684Class\u5bf9\u8c61\uff0cClass\u5bf9\u8c61\u5305\u542b\u4e86\u7c7b\u7684\u5143\u6570\u636e\u4fe1\u606f\uff0c\u5e76\u63d0\u4f9b\u4e86\u8bbf\u95ee\u548c\u64cd\u4f5c\u7c7b\u7684\u63a5\u53e3\u3002<\/li>\n\n\n\n<li>\u83b7\u53d6 Class\u5bf9\u8c61\uff1aClass\u5bf9\u8c61\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u83b7\u53d6\uff0c\u6700\u5e38\u89c1\u7684\u65b9\u5f0f\u6709 3\u79cd: \u7c7b\u7684 .class\u5c5e\u6027\u3001\u7c7b\u5b9e\u4f8b\u7684 getClass()\u65b9\u6cd5\u3001Class.forName()\u3002<\/li>\n\n\n\n<li>\u8bbf\u95ee\u548c\u64cd\u4f5c\uff1a\u901a\u8fc7Class\u5bf9\u8c61\u83b7\u53d6\u7c7b\u7684\u5b57\u6bb5\u3001\u65b9\u6cd5\u3001\u6784\u9020\u51fd\u6570\u7b49\u4fe1\u606f,\u4f7f\u7528Field\u7c7b\u548cMethod\u7c7b\u6765\u8bbf\u95ee\u548c\u64cd\u4f5c\u5b57\u6bb5\u548c\u65b9\u6cd5\uff0c\u751a\u81f3\u53ef\u4ee5\u8c03\u7528\u79c1\u6709\u7684\u5b57\u6bb5\u548c\u65b9\u6cd5\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u901a\u8fc7\u4e0a\u8ff0\u7684\u5206\u6790\u53ef\u4ee5\u770b\u51fa\uff1a\u53cd\u5c04\u673a\u5236\u9700\u8981\u57fa\u4e8eJava\u865a\u62df\u673a\u5bf9\u7c7b\u7684\u52a0\u8f7d\u3001\u5b58\u50a8\u548c\u8bbf\u95ee\u673a\u5236\u7684\u652f\u6301\uff0c\u901a\u8fc7\u53cd\u5c04\uff0c\u53ef\u4ee5\u5728\u8fd0\u884c\u65f6\u52a8\u6001\u5730\u63a2\u7d22\u548c\u64cd\u4f5c\u7c7b\u7684\u4fe1\u606f\uff0c\u5b9e\u73b0\u7075\u6d3b\u7684\u7f16\u7a0b\u548c\u4ee3\u7801\u7684\u52a8\u6001\u884c\u4e3a\u3002<\/p>\n\n\n\n<p><strong>\u4e09\u3001\u5982\u4f55\u4f7f\u7528\u53cd\u5c04\u00a0<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5728\u8bb2\u89e3\u4e86 Java\u53cd\u5c04\u539f\u7406\u4e4b\u540e\uff0c\u6211\u4eec\u901a\u8fc7\u4e00\u4e2a\u771f\u5b9e\u7684\u4f8b\u5b50\u6765\u5c55\u793a\u5982\u4f55\u4f7f\u7528 Java\u53cd\u5c04\u673a\u5236\u3002\u5982\u4e0b\u793a\u4f8b demo\uff0c\u901a\u8fc7\u53cd\u5c04\u7ed9 Person \u7c7b\u4e2d\u7684 greet() \u65b9\u6cd5\u4f20\u5165\u4e00\u4e2a name\uff0c\u7136\u540e\u8f93\u51fa\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-72-1024x1024.png\" alt=\"\" class=\"wp-image-15858\" style=\"width:528px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-72-1024x1024.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-72-300x300.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-72-150x150.png 150w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-72-768x768.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-72-830x830.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-72-230x230.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-72-350x350.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-72-480x480.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-72.png 1266w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u8fc7\u7a0b\u5206\u6790\uff1a<\/p>\n\n\n\n<ul>\n<li>\u9996\u5148\uff0c\u5728\u793a\u4f8b\u4ee3\u7801\u901a\u8fc7\u83b7Person.class\u53d6\u4e86 Person\u7684Class\u5bf9\u8c61\uff1b<\/li>\n\n\n\n<li>\u7136\u540e\uff0c\u4f7f\u7528clazz.getName()\u83b7\u53d6\u4e86\u7c7b\u7684\u540d\u79f0\uff0c\u901a\u8fc7clazz.getModifiers()\u83b7\u53d6\u4e86\u7c7b\u7684\u4fee\u9970\u7b26\uff0c\u5e76\u6253\u5370\u8f93\u51fa\uff1b<\/li>\n\n\n\n<li>\u63a5\u4e0b\u6765\uff0c\u901a\u8fc7clazz.getDeclaredMethods()\u83b7\u53d6\u7c7b\u7684\u6240\u6709\u65b9\u6cd5\uff0c\u5e76\u4f9d\u6b21\u6253\u5370\u8f93\u51fa\u65b9\u6cd5\u7684\u540d\u79f0\uff1b<\/li>\n\n\n\n<li>\u63a5\u7740\uff0c\u901a\u8fc7clazz.getDeclaredConstructor().newInstance()\u65b9\u6cd5\u521b\u5efa\u4e86 Person \u7684\u5b9e\u4f8b\uff1b<\/li>\n\n\n\n<li>\u518d\u63a5\u7740\uff0c\u4f7f\u7528clazz.getDeclaredMethod()\u65b9\u6cd5\u83b7\u53d6\u4e86 greet()\u65b9\u6cd5\u7684\u5f15\u7528\u3002\u4e3a\u4e86\u8c03\u7528\u79c1\u6709\u65b9\u6cd5\uff0c\u6211\u4eec\u9700\u8981\u8c03\u7528setAccessible(true)\u6765\u8bbe\u7f6e\u65b9\u6cd5\u7684\u53ef\u8bbf\u95ee\u6027\u3002<\/li>\n\n\n\n<li>\u6700\u540e\uff0c\u4f7f\u7528Method.invoke()\u65b9\u6cd5\u8c03\u7528\u4e86 greet()\u65b9\u6cd5\uff0c\u4f20\u9012\u53c2\u6570name = Java\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u8fd0\u884c\u793a\u4f8b\u7ed3\u679c\u5982\u4e0b\u56fe\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"346\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-73-1024x346.png\" alt=\"\" class=\"wp-image-15859\" style=\"width:504px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-73-1024x346.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-73-300x101.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-73-768x259.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-73-830x280.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-73-230x78.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-73-350x118.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-73-480x162.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-73.png 1274w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u4e0a\u8ff0\u793a\u4f8b\uff0c\u6211\u4eec\u901a\u8fc7\u8be6\u7ec6\u7684\u6b65\u9aa4\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528\u53cd\u5c04\u83b7\u53d6\u7c7b\u7684\u4fe1\u606f\u548c\u52a8\u6001\u8c03\u7528\u65b9\u6cd5\u3002\u4f60\u4e5f\u53ef\u4ee5\u5c1d\u8bd5\u5728 Person \u4e2d\u6dfb\u52a0\u66f4\u591a\u7684\u65b9\u6cd5\u548c\u5b57\u6bb5\uff0c\u5e76\u4f7f\u7528\u53cd\u5c04\u6765\u83b7\u53d6\u548c\u64cd\u4f5c\u5b83\u4eec\u3002<\/p>\n\n\n\n<p><strong>\u56db\u3001\u90e8\u5206\u6e90\u7801\u89e3\u8bfb\u00a0<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5728\u4e0a\u8ff0\u793a\u4f8b\u8bb2\u89e3\u65f6\uff0c\u6700\u540e\u662f\u8c03\u7528 Method.invoke() \u5b9e\u73b0 Person.greet()\u7684\u8c03\u7528\uff0c\u56e0\u6b64\uff0c\u8fd9\u91cc\u6211\u4eec\u4e3b\u8981\u5206\u6790 invoke()\u65b9\u6848\uff0c\u5b98\u65b9\u6e90\u7801\u622a\u56fe\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"566\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-74-1024x566.png\" alt=\"\" class=\"wp-image-15860\" style=\"width:536px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-74-1024x566.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-74-300x166.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-74-768x425.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-74-830x459.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-74-230x127.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-74-350x194.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-74-480x265.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-74.png 1284w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u4ece\u4e0a\u9762\u6e90\u7801\u622a\u56fe\u770b\u51fa\uff1aMethod.invoke() \u65b9\u6cd5\uff0c\u771f\u5b9e\u8fd4\u56de\u7684\u662f\u63a5\u53e3 MethodAccessor.invoke()\u65b9\u6cd5\u3002MethodAccessor \u63a5\u53e3\u6709\u4e09\u4e2a\u5b9e\u73b0\u7c7b\uff0c\u5177\u4f53\u662f\u8c03\u7528\u54ea\u4e2a\u7c7b\u7684 invoke \u65b9\u6cd5\uff1f<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"602\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-75-1024x602.png\" alt=\"\" class=\"wp-image-15861\" style=\"width:540px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-75-1024x602.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-75-300x176.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-75-768x451.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-75-830x488.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-75-230x135.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-75-350x206.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-75-480x282.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-75.png 1280w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u8fdb\u5165acquireMethodAccessor\u65b9\u6cd5\uff0c\u53ef\u4ee5\u770b\u5230MethodAccessor\u7531ReflectionFactory \u7684 newMethodAccessor\u65b9\u6cd5\u51b3\u5b9a\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"639\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-76-1024x639.png\" alt=\"\" class=\"wp-image-15862\" style=\"width:562px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-76-1024x639.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-76-300x187.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-76-768x479.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-76-830x518.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-76-230x143.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-76-350x218.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-76-480x299.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-76.png 1276w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"890\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-77-1024x890.png\" alt=\"\" class=\"wp-image-15863\" style=\"width:558px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-77-1024x890.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-77-300x261.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-77-768x667.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-77-830x721.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-77-230x200.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-77-350x304.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-77-480x417.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-77.png 1266w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u518d\u8fdb\u5165 DelegatingMethodAccessorImpl \u7684 invoke\u65b9\u6cd5\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"552\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-79-1024x552.png\" alt=\"\" class=\"wp-image-15865\" style=\"width:564px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-79-1024x552.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-79-300x162.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-79-768x414.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-79-830x447.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-79-230x124.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-79-350x189.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-79-480x259.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-79.png 1270w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>DelegatingMethodAccessorImpl\u7684invoke\u65b9\u6cd5\u8fd4\u56de\u7684\u662fMethodAccessorImpl\u7684invoke\u65b9\u6cd5\uff0c\u800cMethodAccessorImpl\u7684invoke\u65b9\u6cd5\uff0c\u7531\u5b83\u7684\u5b50\u7c7bNativeMethodAccessorImpl\u91cd\u5199\uff0c\u8fd9\u65f6\u5019\u8fd4\u56de\u7684\u662fnative invoke0\uff0c\u5982\u4e0b\u56fe\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"539\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-81-1024x539.png\" alt=\"\" class=\"wp-image-15867\" style=\"width:570px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-81-1024x539.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-81-300x158.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-81-768x404.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-81-830x437.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-81-230x121.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-81-350x184.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-81-480x253.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2024\/07\/image-81.png 1280w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u8ddf\u5230\u6e90\u7801\u6700\u540e\u53ef\u4ee5\u53d1\u73b0\uff1aMethod.invoke()\u65b9\u6cd5\u6700\u7ec8\u8c03\u7528 native\u7684invoke0()\uff0c\u5e94\u7528\u5c42\u9762\u7684\u64cd\u4f5c\u6700\u7ec8\u8f6c\u6362\u6210\u5bf9\u64cd\u4f5c\u7cfb\u7edf c\/c++\u65b9\u6cd5\u7684\u8c03\u7528\u3002<\/p>\n\n\n\n<p><strong>\u4e94\u3001\u53cd\u5c04\u4f18\u7f3a\u70b9\u00a0<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u4e0a\u9762\u5185\u5bb9\u7684\u8bb2\u89e3\u5df2\u7ecf\u4fa7\u9762\u53cd\u6620\u51fa\u4e86Java\u53cd\u5c04\u7684\u4e00\u4e9b\u4f18\u70b9\uff0c\u8fd9\u91cc\u518d\u8be6\u7ec6\u7684\u603b\u7ed3\u4e0b\u53cd\u5c04\u7684\u4f18\u7f3a\u70b9\uff1a<\/p>\n\n\n\n<p><strong>\u4f18\u70b9\uff1a<\/strong><\/p>\n\n\n\n<ol>\n<li>\u52a8\u6001\u6027\uff1a\u53cd\u5c04\u5141\u8bb8\u6211\u4eec\u5728\u8fd0\u884c\u65f6\u52a8\u6001\u5730\u83b7\u53d6\u548c\u64cd\u4f5c\u7c7b\u7684\u4fe1\u606f\uff0c\u800c\u4e0d\u9700\u8981\u5728\u7f16\u8bd1\u65f6\u786e\u5b9a\u3002\u8fd9\u4e3a\u7f16\u5199\u7075\u6d3b\u7684\u3001\u53ef\u6269\u5c55\u7684\u4ee3\u7801\u63d0\u4f9b\u4e86\u4fbf\u5229\u3002<\/li>\n\n\n\n<li>\u7075\u6d3b\u6027\uff1a\u901a\u8fc7\u53cd\u5c04\uff0c\u6211\u4eec\u53ef\u4ee5\u7ed5\u8fc7\u8bbf\u95ee\u4fee\u9970\u7b26\u7684\u9650\u5236\uff0c\u8bbf\u95ee\u548c\u4fee\u6539\u79c1\u6709\u6210\u5458\u3001\u8c03\u7528\u79c1\u6709\u65b9\u6cd5\u7b49\u3002\u8fd9\u4e3a\u6211\u4eec\u5728\u7279\u6b8a\u60c5\u51b5\u4e0b\u8fdb\u884c\u4e00\u4e9b\u9ad8\u7ea7\u64cd\u4f5c\u63d0\u4f9b\u4e86\u53ef\u80fd\u3002<\/li>\n\n\n\n<li>\u6846\u67b6\u5f00\u53d1\uff1a\u53cd\u5c04\u5728\u5f00\u53d1\u6846\u67b6\u548c\u5e93\u65f6\u975e\u5e38\u6709\u7528\u3002\u901a\u8fc7\u53cd\u5c04\uff0c\u6846\u67b6\u53ef\u4ee5\u52a8\u6001\u5730\u52a0\u8f7d\u548c\u5b9e\u4f8b\u5316\u7c7b\uff0c\u89e3\u6790\u6ce8\u89e3\uff0c\u5904\u7406\u56de\u8c03\u7b49\u3002\u8fd9\u4e3a\u6846\u67b6\u63d0\u4f9b\u4e86\u66f4\u5927\u7684\u7075\u6d3b\u6027\u548c\u53ef\u6269\u5c55\u6027\u3002<\/li>\n\n\n\n<li>\u8c03\u8bd5\u548c\u63a2\u7d22\uff1a\u53cd\u5c04\u4f7f\u5f97\u6211\u4eec\u53ef\u4ee5\u5728\u8fd0\u884c\u65f6\u63a2\u7d22\u4ee3\u7801\u80cc\u540e\u7684\u4fe1\u606f\uff0c\u4f8b\u5982\u83b7\u53d6\u7c7b\u7684\u7ed3\u6784\u3001\u65b9\u6cd5\u3001\u5b57\u6bb5\u7b49\u3002\u8fd9\u5bf9\u4e8e\u8c03\u8bd5\u548c\u7406\u89e3\u590d\u6742\u7684\u4ee3\u7801\u975e\u5e38\u6709\u5e2e\u52a9\u3002<\/li>\n<\/ol>\n\n\n\n<p><strong>\u7f3a\u70b9\uff1a<\/strong><\/p>\n\n\n\n<ol>\n<li>\u6027\u80fd\u5f00\u9500\uff1a\u76f8\u6bd4\u4e8e\u76f4\u63a5\u8c03\u7528\u4ee3\u7801\uff0c\u4f7f\u7528\u53cd\u5c04\u4f1a\u5e26\u6765\u66f4\u9ad8\u7684\u6027\u80fd\u5f00\u9500\u3002\u53cd\u5c04\u6d89\u53ca\u5230\u52a8\u6001\u67e5\u627e\u3001\u65b9\u6cd5\u8c03\u7528\u7b49\u64cd\u4f5c\uff0c\u8fd9\u4e9b\u64cd\u4f5c\u6bd4\u76f4\u63a5\u8c03\u7528\u4ee3\u7801\u66f4\u52a0\u8017\u65f6\u3002\u56e0\u6b64\uff0c\u5728\u5bf9\u6027\u80fd\u8981\u6c42\u8f83\u9ad8\u7684\u573a\u666f\u4e0b\uff0c\u8fc7\u5ea6\u4f7f\u7528\u53cd\u5c04\u53ef\u80fd\u5bfc\u81f4\u6027\u80fd\u4e0b\u964d\u3002<\/li>\n\n\n\n<li>\u5b89\u5168\u6027\u548c\u7a33\u5b9a\u6027\uff1a\u53cd\u5c04\u6253\u7834\u4e86\u5c01\u88c5\u6027\u548c\u7c7b\u578b\u5b89\u5168\u6027\uff0c\u901a\u8fc7\u53cd\u5c04\uff0c\u6211\u4eec\u53ef\u4ee5\u7ed5\u8fc7\u8bbf\u95ee\u4fee\u9970\u7b26\u7684\u9650\u5236\uff0c\u8c03\u7528\u79c1\u6709\u65b9\u6cd5\u7b49\uff0c\u8fd9\u53ef\u80fd\u5bfc\u81f4\u4ee3\u7801\u7684\u4e0d\u7a33\u5b9a\u6027\u548c\u5b89\u5168\u9690\u60a3\u3002\u56e0\u6b64\uff0c\u4f7f\u7528\u53cd\u5c04\u65f6\u9700\u8981\u683c\u5916\u5c0f\u5fc3\uff0c\u786e\u4fdd\u4ee3\u7801\u7684\u6b63\u786e\u6027\u548c\u7a33\u5b9a\u6027\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u4ece\u6574\u4f53\u4e0a\u770b\uff0cJava\u53cd\u5c04\u662f\u4ee5\u727a\u7272\u4e86\u5c0f\u90e8\u5206\u7684\u6027\u80fd\u6362\u53d6\u4e86\u66f4\u597d\u7684\u6269\u5c55\u6027\u548c\u7075\u6d3b\u6027\uff0c\u727a\u7272\u5c0f\u6211\u6210\u5c31\u5927\u6211\uff0c\u800c\u4e14\uff0c\u968f\u7740\u73b0\u4ee3\u786c\u4ef6\u8bbe\u5907\u80fd\u529b\u8d8a\u6765\u8d8a\u5f3a\uff0c\u8fd9\u70b9\u5c0f\u6027\u80fd\u7684\u727a\u7272\u662f\u5b8c\u5168\u503c\u5f97\u7684\u3002<\/p>\n\n\n\n<p><strong>\u516d\u3001\u4e3a\u4ec0\u4e48\u9700\u8981\u53cd\u5c04\u00a0<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u53cd\u5c04\u673a\u5236\u5728 Java\u4e2d\u7684\u4f5c\u7528\u4e0d\u8a00\u800c\u55bb\uff0c\u4e0b\u9762\u5217\u4e3e\u4e86\u53cd\u5c04\u673a\u5236\u7684\u4e00\u4e9b\u5e38\u89c1\u573a\u666f\u548c\u539f\u56e0\uff1a<\/p>\n\n\n\n<ul>\n<li>\u8fd0\u884c\u65f6\u7c7b\u578b\u68c0\u67e5\uff1a\u53cd\u5c04\u673a\u5236\u5141\u8bb8\u5728\u8fd0\u884c\u65f6\u83b7\u53d6\u7c7b\u7684\u4fe1\u606f\uff0c\u5305\u62ec\u5b57\u6bb5\u3001\u65b9\u6cd5\u548c\u6784\u9020\u65b9\u6cd5\u7b49\u3002\u56e0\u6b64\uff0c\u5728\u8fdb\u884c\u8fd0\u884c\u65f6\u7c7b\u578b\u68c0\u67e5\uff0c\u4ee5\u786e\u4fdd\u4ee3\u7801\u5728\u5904\u7406\u4e0d\u540c\u7c7b\u578b\u7684\u5bf9\u8c61\u65f6\u80fd\u591f\u6b63\u786e\u5730\u8fdb\u884c\u64cd\u4f5c\u3002<\/li>\n\n\n\n<li>\u52a8\u6001\u521b\u5efa\u5bf9\u8c61\uff1a\u901a\u8fc7\u53cd\u5c04\uff0c\u53ef\u4ee5\u5728\u8fd0\u884c\u65f6\u52a8\u6001\u5730\u521b\u5efa\u5bf9\u8c61\uff0c\u800c\u4e0d\u9700\u8981\u5728\u7f16\u8bd1\u65f6\u77e5\u9053\u5177\u4f53\u7684\u7c7b\u540d\u3002\u8fd9\u5bf9\u4e8e\u67d0\u4e9b\u9700\u8981\u6839\u636e\u6761\u4ef6\u6216\u914d\u7f6e\u6765\u521b\u5efa\u5bf9\u8c61\u7684\u60c5\u51b5\u975e\u5e38\u6709\u7528\uff0c\u4f8b\u5982\u5de5\u5382\u6a21\u5f0f\u6216\u4f9d\u8d56\u6ce8\u5165\u6846\u67b6\u3002<\/li>\n\n\n\n<li>\u8bbf\u95ee\u548c\u4fee\u6539\u79c1\u6709\u6210\u5458\uff1a\u53cd\u5c04\u673a\u5236\u53ef\u4ee5\u7ed5\u8fc7\u8bbf\u95ee\u6743\u9650\u9650\u5236\uff0c\u8bbf\u95ee\u548c\u4fee\u6539\u7c7b\u7684\u79c1\u6709\u5b57\u6bb5\u548c\u65b9\u6cd5\u3002\u867d\u7136\u8fd9\u7834\u574f\u4e86\u5c01\u88c5\u6027\u539f\u5219\uff0c\u4f46\u5728\u67d0\u4e9b\u7279\u5b9a\u60c5\u51b5\u4e0b\uff0c\u8fd9\u79cd\u80fd\u529b\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u8fdb\u884c\u4e00\u4e9b\u7279\u6b8a\u64cd\u4f5c\uff0c\u4f8b\u5982\u5355\u5143\u6d4b\u8bd5\u3001\u8c03\u8bd5\u6216\u6846\u67b6\u7684\u5185\u90e8\u5b9e\u73b0\u3002<\/li>\n\n\n\n<li>\u52a8\u6001\u8c03\u7528\u65b9\u6cd5\uff1a\u53cd\u5c04\u673a\u5236\u5141\u8bb8\u6211\u4eec\u5728\u8fd0\u884c\u65f6\u52a8\u6001\u5730\u8c03\u7528\u7c7b\u7684\u65b9\u6cd5\uff0c\u751a\u81f3\u53ef\u4ee5\u6839\u636e\u8fd0\u884c\u65f6\u7684\u6761\u4ef6\u6765\u9009\u62e9\u4e0d\u540c\u7684\u65b9\u6cd5\u3002\u8fd9\u5bf9\u4e8e\u5b9e\u73b0\u63d2\u4ef6\u5316\u7cfb\u7edf\u3001\u5904\u7406\u56de\u8c03\u51fd\u6570\u6216\u5b9e\u73b0\u52a8\u6001\u4ee3\u7406\u7b49\u529f\u80fd\u975e\u5e38\u6709\u7528\u3002<\/li>\n\n\n\n<li>\u6846\u67b6\u548c\u5e93\u7684\u5b9e\u73b0\uff1a\u8bb8\u591aJava\u6846\u67b6\u548c\u5e93\u5728\u5176\u5b9e\u73b0\u4e2d\u5e7f\u6cdb\u4f7f\u7528\u4e86\u53cd\u5c04\u673a\u5236\u3002\u5b83\u4eec\u5229\u7528\u53cd\u5c04\u6765\u81ea\u52a8\u53d1\u73b0\u548c\u52a0\u8f7d\u7c7b\u3001\u5b9e\u73b0\u4f9d\u8d56\u6ce8\u5165\u3001\u5904\u7406\u6ce8\u89e3\u3001\u914d\u7f6e\u6587\u4ef6\u89e3\u6790\u548c\u52a8\u6001\u4ee3\u7406\u7b49\u3002\u53cd\u5c04\u673a\u5236\u4f7f\u5f97\u8fd9\u4e9b\u6846\u67b6\u548c\u5e93\u66f4\u52a0\u7075\u6d3b\u548c\u6269\u5c55\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u4e03\u3001\u5e38\u7528\u6846\u67b6\u00a0<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5f88\u591a\u4f18\u79c0\u7684\u6846\u67b6\u5185\u90e8\u90fd\u4f7f\u7528\u4e86Java\u53cd\u5c04\uff0c\u8fd9\u91cc\u91cd\u70b9\u8bb2\u89e3\u4e0b\u7ed9 Java\u6253\u4e0b\u534a\u58c1\u6c5f\u5c71\u7684 Spring\u751f\u6001\uff08Spring Framework\uff0cSpring MVC\uff0cSpringBoot\uff0c SpringCloud&#8230;\uff09\uff0c\u4ee5 Spring Framework\u4e3a\u4f8b\uff1a<\/p>\n\n\n\n<ol>\n<li>\u4f9d\u8d56\u6ce8\u5165\uff08Dependency Injection\uff09 : \u4f9d\u8d56\u6ce8\u5165\uff0c\u53ef\u4ee5\u628a\u7a0b\u5e8f\u5458\u4e3b\u52a8\u521b\u5efa\u5bf9\u8c61\u7684\u4e8b\u60c5\u4ea4\u7ed9 Spring\u7ba1\u7406\uff0c\u5927\u5927\u63d0\u5347\u4e86\u5bf9\u8c61\u521b\u5efa\u7684\u7075\u6d3b\u6027\u3002\u5f53\u6211\u4eec\u5728\u914d\u7f6e\u6587\u4ef6\u6216\u7528\u6ce8\u89e3\u5b9a\u4e49 Bean\u65f6\uff0cSpring\u4f1a\u4f7f\u7528\u53cd\u5c04\u6765\u52a8\u6001\u5730\u5b9e\u4f8b\u5316\u5bf9\u8c61\uff0c\u5e76\u5c06\u4f9d\u8d56\u7684\u5176\u4ed6\u5bf9\u8c61\u6ce8\u5165\u5230\u8fd9\u4e9b\u5b9e\u4f8b\u4e2d\u3002<\/li>\n\n\n\n<li>\u81ea\u52a8\u88c5\u914d\uff08Autowired\uff09 : \u5f53 Spring\u5bb9\u5668\u542f\u52a8\u65f6\uff0c\u5b83\u4f1a\u626b\u63cf\u5e94\u7528\u7a0b\u5e8f\u4e2d\u7684\u6240\u6709\u7c7b\uff0c\u5e76\u4f7f\u7528\u53cd\u5c04\u6765\u67e5\u627e\u548c\u8bc6\u522b\u5e26\u6709 @Autowired\u6ce8\u89e3\u7684\u5b57\u6bb5\u3001\u65b9\u6cd5\u6216\u6784\u9020\u51fd\u6570\u3002\u518d\u81ea\u52a8\u5c06 Bean\u6ce8\u5165\u5230\u9700\u8981\u7684\u4f4d\u7f6e\uff0c\u5b9e\u73b0\u5bf9\u8c61\u4e4b\u95f4\u7684\u81ea\u52a8\u8fde\u63a5\u3002<\/li>\n\n\n\n<li>AOP\uff08Aspect-Oriented Programming\uff09 : AOP \u5229\u7528\u4e86\u52a8\u6001\u4ee3\u7406\u548c\u53cd\u5c04\u673a\u5236\u3002\u901a\u8fc7\u5b9a\u4e49\u5207\u9762\uff08Aspect\uff09\u548c\u5207\u70b9\uff08Pointcut\uff09\uff0cSpring\u53ef\u4ee5\u5728\u8fd0\u884c\u65f6\u4f7f\u7528\u53cd\u5c04\u6765\u521b\u5efa\u4ee3\u7406\u5bf9\u8c61\uff0c\u4ece\u800c\u5b9e\u73b0\u6a2a\u5207\u5173\u6ce8\u70b9\uff08cross-cutting concerns\uff09\u7684\u529f\u80fd\uff0c\u5982\u65e5\u5fd7\u8bb0\u5f55\u3001\u4e8b\u52a1\u7ba1\u7406\u7b49\u3002<\/li>\n\n\n\n<li>\u52a8\u6001\u4ee3\u7406\uff08Dynamic Proxy\uff09 : Spring\u5229\u7528 Java\u53cd\u5c04\u673a\u5236\u52a8\u6001\u5730\u521b\u5efa\u4ee3\u7406\u5bf9\u8c61\uff0c\u5e76\u5728\u4ee3\u7406\u5bf9\u8c61\u4e2d\u6dfb\u52a0\u989d\u5916\u7684\u903b\u8f91\uff0c\u4ece\u800c\u5b9e\u73b0\u5bf9\u76ee\u6807\u5bf9\u8c61\u7684\u589e\u5f3a\u3002<\/li>\n\n\n\n<li>\u6846\u67b6\u6269\u5c55\u548c\u5b9a\u5236: Spring\u901a\u8fc7\u53cd\u5c04\u673a\u5236\u6765\u5b9e\u73b0\u5bf9\u5e94\u7528\u7a0b\u5e8f\u7684\u6269\u5c55\u548c\u5b9a\u5236\u7684\u3002\u4f8b\u5982\uff0cSpring\u63d0\u4f9b\u4e86BeanPostProcessor\u63a5\u53e3\uff0c\u5141\u8bb8\u5f00\u53d1\u4eba\u5458\u5728 Bean\u521d\u59cb\u5316\u524d\u540e\u63d2\u5165\u81ea\u5b9a\u4e49\u903b\u8f91\uff0c\u8fd9\u662f\u901a\u8fc7\u53cd\u5c04\u6765\u5b9e\u73b0\u7684\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u53e6\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u8033\u719f\u80fd\u8be6\u7684\u6846\u67b6\u4e5f\u4f7f\u7528\u4e86Java\u53cd\u5c04\uff1a<\/p>\n\n\n\n<ol>\n<li>JUnit\uff1aJUnit\u662f\u4e00\u4e2a\u4f18\u79c0\u7684\u5355\u5143\u6d4b\u8bd5\u6846\u67b6\uff0c\u5b83\u5229\u7528\u4e86 Java\u53cd\u5c04\u673a\u5236\u52a8\u6001\u5730\u52a0\u8f7d\u548c\u6267\u884c\u6d4b\u8bd5\u65b9\u6cd5\u3002<\/li>\n\n\n\n<li>Jackson\uff1aJackson\u662f\u4e00\u4e2a JSON\u5904\u7406\u7684 Java\u5e93\uff0c\u5b83\u5229\u7528\u53cd\u5c04\u6765\u5b9e\u73b0 JSON\u4e0e Java\u5bf9\u8c61\u4e4b\u95f4\u7684\u8f6c\u6362\uff0c\u52a8\u6001\u8bfb\u53d6\u548c\u5199\u5165 Java\u5bf9\u8c61\u7684\u5c5e\u6027\uff0c\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a JSON\u683c\u5f0f\u3002<\/li>\n\n\n\n<li>Hibernate ORM\uff1aHibernate\u548c MyBatis\u4e00\u6837\uff0c\u90fd\u662f\u5bf9\u8c61\u5173\u7cfb\u6620\u5c04\u6846\u67b6\uff0c\u901a\u8fc7\u53cd\u5c04\u6765\u5b9e\u73b0\u5bf9\u8c61\u4e0e\u6570\u636e\u5e93\u8868\u4e4b\u95f4\u7684\u6620\u5c04\u5173\u7cfb\u3002<\/li>\n<\/ol>\n\n\n\n<p><strong>\u516b\u3001\u603b\u7ed3\u00a0<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u672c\u6587\u8bb2\u89e3\u4e86Java\u53cd\u5c04\u7684\u539f\u7406\u548c\u4f7f\u7528\u65b9\u5f0f\uff0c\u56e0\u4e3a\u6709\u4e86Java\u53cd\u5c04\uff0c\u5f88\u591a\u4f18\u79c0\u7684\u6846\u67b6\u5e94\u8fd0\u800c\u751f\uff0c\u4ece\u800c\u4f7f\u5f97 Java \u751f\u6001\u8d8a\u6765\u8d8a\u5b8c\u5584\uff0c\u56e0\u6b64\uff0c\u53cd\u5c04\u662f\u7edd\u5927\u591a\u6570\u6846\u67b6\u7684\u57fa\u77f3\u3002<\/p>\n\n\n\n<p>Java\u53cd\u5c04\u6709\u4f18\u70b9\u4e5f\u6709\u7f3a\u70b9\uff0c\u4ece\u6574\u4f53\u4e0a\u770b\uff0cJava\u53cd\u5c04\u662f\u4ee5\u727a\u7272\u4e86\u5c0f\u90e8\u5206\u7684\u6027\u80fd\u6362\u53d6\u4e86\u66f4\u597d\u7684\u6269\u5c55\u6027\u548c\u7075\u6d3b\u6027\uff0c\u727a\u7272\u5c0f\u6211\u6210\u5c31\u5927\u6211\uff0c\u800c\u4e14\uff0c\u968f\u7740\u73b0\u4ee3\u786c\u4ef6\u8bbe\u5907\u80fd\u529b\u8d8a\u6765\u8d8a\u5f3a\uff0c\u8fd9\u70b9\u5c0f\u6027\u80fd\u7684\u727a\u7272\u662f\u5b8c\u5168\u503c\u5f97\u7684\u3002<\/p>\n\n\n\n<p>\u638c\u63e1Java\u53cd\u5c04\uff0c\u6211\u4eec\u53ef\u4ee5\u66f4\u597d\u7684\u7406\u89e3\u4e00\u4e9b\u4f18\u79c0\u6846\u67b6\u7684\u8fd0\u884c\u673a\u5236\uff0c\u6bd4\u5982\uff1aSpring\u3002\u5b83\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u66f4\u597d\u7684\u4f7f\u7528\u6846\u67b6\uff0c\u9047\u5230\u95ee\u9898\u65f6\u4e5f\u80fd\u66f4\u597d\u7684\u53bb\u5206\u6790\u548c\u89e3\u51b3\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8f6c\u8f7d\uff1a\u53cd\u5c04\uff1a\u8ba9\u4f60\u66f4\u4f18\u96c5\u7684\u4f7f\u7528\u6846\u67b6\uff01 \u5728 Java\u8bed\u8a00\u4e2d\uff0c\u53cd\u5c04\u662f\u4e00\u79cd\u5f3a\u5927\u800c\u4f18\u79c0\u7684\u673a\u5236\uff0c\u901a\u8fc7\u53cd\u5c04\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u8fd0\u884c\u65f6 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,10],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/15854"}],"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=15854"}],"version-history":[{"count":1,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/15854\/revisions"}],"predecessor-version":[{"id":15868,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/15854\/revisions\/15868"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15854"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15854"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15854"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}