{"id":51228,"date":"2025-08-10T19:24:27","date_gmt":"2025-08-10T11:24:27","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/51228.html"},"modified":"2025-08-10T19:24:27","modified_gmt":"2025-08-10T11:24:27","slug":"springboot%e5%ad%a6%e4%b9%a0%e6%97%a5%e8%ae%b0%ef%bc%88%e4%b8%89%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/51228.html","title":{"rendered":"SpringBoot\u5b66\u4e60\u65e5\u8bb0\uff08\u4e09\uff09"},"content":{"rendered":"<h2>IOC\u63a7\u5236\u53cd\u8f6c\u548cDI\u4f9d\u8d56\u6ce8\u5165<\/h2>\n<p>\u770b\u8fc7\u4e3b\u5305\u4e0a\u7bc7\u7684\u5185\u5bb9\u5e94\u8be5\u5c31\u5f88\u597d\u7406\u89e3\u8fd9\u4e24\u4e2aSpring\u7279\u6027\u529f\u80fd\u4e86&#xff0c;\u73b0\u5728\u5c31\u518d\u6765\u603b\u7ed3\u4e00\u4e0b&#xff0c;IOC\u5c31\u662f\u4ece\u4ee5\u524d\u6211\u4eec\u81ea\u5df1\u624b\u52a8new\u4e00\u4e2aBean\u53d8\u6210\u4e86\u7531Spring\u5bb9\u5668\u7ba1\u7406Bean\u7684\u751f\u547d\u5468\u671f&#xff0c;\u4e5f\u5c31\u662fBean\u7684\u751f\u6b7b\u57fa\u672c\u4e0a\u4e0d\u7528\u6211\u4eec\u7ba1\u4e86&#xff0c;\u800c\u8fd9\u4e2aDI\u4f9d\u8d56\u6ce8\u5165\u5c31\u662f\u628aSpring\u5bb9\u5668\u7ba1\u7406\u7684Bean\u7684\u5bf9\u8c61\u7684\u5730\u5740\u5f15\u7528\u8d4b\u503c\u7ed9\u9700\u8981\u4f7f\u7528\u7684\u7c7b\u7684\u53d8\u91cf\u4e2d&#xff0c;\u8ba9\u8fd9\u4e2aBean\u53ef\u590d\u7528&#xff0c;\u8fd9\u6837\u6765\u770b\u662f\u4e0d\u662f\u5c31\u5f88\u7b80\u5355\u4e86\u3002<\/p>\n<h2>\u5faa\u73af\u4f9d\u8d56<\/h2>\n<p>\u5faa\u73af\u4f9d\u8d56\u662f\u6307\u4e24\u4e2a\u6216\u591a\u4e2aBean\u76f8\u4e92\u4f9d\u8d56\u5f62\u6210\u7684\u73af\u5f62\u5f15\u7528\u94fe&#xff0c;\u5bfc\u81f4\u5bb9\u5668\u65e0\u6cd5\u5b8c\u6210\u4f9d\u8d56\u6ce8\u5165\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"306\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810112424-6898816812dc1.png\" width=\"1075\" \/><\/p>\n<p>\u8fd9\u4e2a\u5e94\u8be5\u5f88\u597d\u7406\u89e3\u5427&#xff0c;\u5c31\u548c\u4e3b\u5305\u4e4b\u524dJVM\u7cfb\u5217\u4e2d\u5f15\u7528\u8ba1\u6570\u6cd5\u4e00\u6837&#xff0c;\u662f\u4e00\u4e2a\u77db\u76fe\u7684\u95ee\u9898&#xff0c;\u89e3\u51b3\u7684\u529e\u6cd5\u4e5f\u5f88\u591a&#xff0c;\u4f46\u662fSpring\u5728\u8fdb\u884cBean\u7684\u52a0\u8f7d\u7684\u65f6\u5019\u4f7f\u7528\u7684\u5c31\u662f\u4e09\u7ea7\u7f13\u5b58\u7684\u6280\u672f&#xff0c;\u4ec0\u4e48\u662f\u4e09\u7ea7\u7f13\u5b58\u5462&#xff1f;\u5c31\u662f\u628aBean\u5206\u6210\u4e09\u4e2a\u6c60\u5b50&#xff0c;\u5927\u6c60\u5b50\u5c31\u662f\u5b8c\u6210\u597d\u7684Bean\u5bf9\u8c61&#xff0c;\u4e8c\u7ea7\u5c31\u662f\u534a\u6210\u54c1\u7684Bean\u5bf9\u8c61&#xff0c;\u4e09\u89d2\u5462\u5c31\u662f\u521a\u521a\u5b9e\u4f8b\u5316\u7684Bean\u5bf9\u8c61&#xff0c;\u4ed6\u4eec\u4e09\u4e2a\u90fd\u662fmap\u7ed3\u6784&#xff0c;\u7136\u540e\u6211\u4eec\u6765\u8bf4\u4e00\u4e0b\u4ed6\u4eec\u7684\u533a\u522b\u3002<\/p>\n<h4>\u00a0\u4e00\u7ea7\u7f13\u5b58&#xff1a;singletonObjects<\/h4>\n<ul>\n<li>\u200b\u5b58\u50a8\u5185\u5bb9\u200b&#xff1a;\u5b8c\u5168\u521d\u59cb\u5316\u597d\u7684\u5355\u4f8bBean<\/li>\n<li>\u200b\u6570\u636e\u7ed3\u6784\u200b&#xff1a;ConcurrentHashMap&lt;String, Object&gt;<\/li>\n<li>\u200b\u7279\u70b9\u200b&#xff1a;\n<ul>\n<li>\u5b58\u50a8\u7684\u662f\u6210\u54c1Bean\u200b<\/li>\n<li>\u6240\u6709\u5c5e\u6027\u5df2\u6ce8\u5165<\/li>\n<li>\u521d\u59cb\u5316\u65b9\u6cd5\u5df2\u6267\u884c<\/li>\n<li>\u53ef\u4ee5\u88ab\u76f4\u63a5\u4f7f\u7528<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>\u4e8c\u7ea7\u7f13\u5b58&#xff1a;earlySingletonObjects<\/h4>\n<ul>\n<li>\u200b\u5b58\u50a8\u5185\u5bb9\u200b&#xff1a;\u63d0\u524d\u66b4\u9732\u7684Bean\u65e9\u671f\u5f15\u7528<\/li>\n<li>\u200b\u6570\u636e\u7ed3\u6784\u200b&#xff1a;HashMap&lt;String, Object&gt;<\/li>\n<li>\u200b\u7279\u70b9\u200b&#xff1a;\n<ul>\n<li>\u5b58\u50a8\u7684\u662f\u534a\u6210\u54c1Bean\u200b<\/li>\n<li>\u5df2\u5b9e\u4f8b\u5316\u4f46\u672a\u5b8c\u6210\u5c5e\u6027\u6ce8\u5165<\/li>\n<li>\u7528\u4e8e\u89e3\u51b3\u5faa\u73af\u4f9d\u8d56<\/li>\n<li>\u53ef\u80fd\u88abAOP\u4ee3\u7406\u5305\u88c5<\/li>\n<\/ul>\n<\/li>\n<li>\u200b\u751f\u547d\u5468\u671f\u200b&#xff1a;\n<\/p>\n<ul>\n<li>Bean\u5b9e\u4f8b\u5316\u540e\u653e\u5165<\/li>\n<li>Bean\u5b8c\u5168\u521d\u59cb\u5316\u540e\u79fb\u9664<\/li>\n<\/ul>\n<h4>\u4e09\u7ea7\u7f13\u5b58&#xff1a;singletonFactories<\/h4>\n<\/p>\n<ul>\n<li>\u200b\u5b58\u50a8\u5185\u5bb9\u200b&#xff1a;Bean\u7684ObjectFactory<\/li>\n<li>\u200b\u6570\u636e\u7ed3\u6784\u200b&#xff1a;HashMap&lt;String, ObjectFactory&lt;?&gt;&gt;<\/li>\n<li>\u200b\u7279\u70b9\u200b&#xff1a;\n<ul>\n<li>\u5b58\u50a8\u7684\u662fBean\u5de5\u5382\u200b<\/li>\n<li>\u53ef\u4ee5\u751f\u6210\u65e9\u671f\u5f15\u7528<\/li>\n<li>\u652f\u6301AOP\u4ee3\u7406\u7684\u5ef6\u8fdf\u751f\u6210<\/li>\n<li>\u5728\u7b2c\u4e00\u6b21\u89e3\u51b3\u5faa\u73af\u4f9d\u8d56\u540e\u79fb\u9664<\/li>\n<\/ul>\n<\/li>\n<li>\u200b\u6838\u5fc3\u4ef7\u503c\u200b&#xff1a;\n<ul>\n<li>\u89e3\u51b3AOP\u4ee3\u7406\u4e0e\u5faa\u73af\u4f9d\u8d56\u7684\u51b2\u7a81<\/li>\n<li>\u5ef6\u8fdf\u4ee3\u7406\u5bf9\u8c61\u7684\u751f\u6210\u65f6\u673a<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u5176\u5b9e\u4ece\u7b80\u5355\u5c42\u9762\u6765\u8bb2\u4f7f\u7528\u4e8c\u7ea7\u7f13\u5b58\u5c31\u53ef\u4ee5\u89e3\u51b3\u8fd9\u4e2a\u5faa\u73af\u4f9d\u8d56\u7684\u95ee\u9898\u4e86&#xff0c;\u4f46\u662f\u6211\u4eecSpring\u662f\u6709\u6269\u5c55\u673a\u5236\u7684&#xff0c;\u8fd8\u8bb0\u4e0d\u8bb0\u5f97\u4e0a\u4e00\u7bc7\u8bf4Bean\u7684\u751f\u547d\u5468\u671f\u7684\u65f6\u5019&#xff0c;\u6709\u8bf4\u5230\u8fc7\u5c5e\u6027\u6ce8\u5165\u540e\u3001Aware\u63a5\u53e3\u56de\u8c03\u540e\u6709\u8fc7BeanPostProcessor\u65b9\u6cd5&#xff0c;\u8fd9\u4e2a\u91cc\u9762\u4f1a\u8c03\u7528\u4e00\u4e2aInitializingBean\u65b9\u6cd5\u8fd9\u4e2a\u5c31\u662f\u6269\u5c55Bean\u7684\u65b9\u6cd5&#xff0c;\u4ed6\u4f1a\u68c0\u67e5\u5f53\u524d\u8fd9\u4e2aBean\u662f\u5426\u751f\u6210\u4e86\u4ee3\u7406\u5bf9\u8c61&#xff0c;\u5982\u679c\u6709\u53c8\u505a\u4e86\u54ea\u4e9b\u64cd\u4f5c\u4e5f\u5c31\u662fAOP\u3002<\/p>\n<p>\u5047\u5982\u6211\u4eec\u4f7f\u7528\u4e8c\u7ea7\u7f13\u5b58&#xff0c;\u6211\u4eec\u4ee5\u4e0b\u9762\u7684\u56fe\u4e3a\u4f8b&#xff0c;A\u653e\u5728\u4e8c\u7ea7\u7f13\u5b58\u3001\u7136\u540e\u5230B\u8c03\u7528A&#xff0c;B\u4ece\u4e8c\u7ea7\u7f13\u5b58\u62ff\u5230\u4e86A&#xff0c;\u7136\u540eB\u653e\u5165\u4e00\u7ea7\u7f13\u5b58&#xff0c;\u56de\u5230A\u8fd9\u4e2a\u65f6\u5019\u8c03\u7528C&#xff0c;\u90a3\u4e48A\u8fd8\u662f\u4e2a\u534a\u6210\u54c1\u4f1a\u653e\u5230\u4e8c\u7ea7\u7f13\u5b58\u4e2d&#xff0c;\u7136\u800c\u5728Map\u4e2dKey\u662f\u65e0\u6cd5\u76f8\u540c\u5b58\u5728\u7684&#xff0c;\u90a3\u4e48C\u5b8c\u6210\u540e&#xff0c;A\u600e\u4e48\u77e5\u9053\u81ea\u5df1\u662f\u5426\u6267\u884c\u4e86AOP\u5462&#xff1f;\u5c31\u7b97\u6709\u90a3C\u600e\u4e48\u77e5\u9053\u62ff\u90a3\u4e2amap\u5462&#xff1f;\u6240\u4ee5\u4e09\u4ef6\u7f13\u5b58\u5c31\u662f\u4e3a\u4e86\u89e3\u51b3\u4ee3\u7406\u7684\u95ee\u9898\u7684\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"300\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810112424-689881684e3c7.png\" width=\"482\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1478\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810112424-68988168783bd.png\" width=\"2282\" \/><\/p>\n<p>\u8fd9\u4e2a\u662f\u5927\u6982\u7684\u4e00\u4e2a\u6d41\u7a0b&#xff0c;\u8fd9\u4e2a\u90e8\u5206\u53ef\u80fd\u5f88\u7ed5&#xff0c;\u7136\u540e\u4e0d\u7406\u7406\u89e3\u7684\u5c0f\u4f19\u4f34\u5efa\u8bae\u8fd8\u662f\u4e0aB\u7ad9\u770b\u89c6\u9891\u5427&#xff0c;\u6587\u7ae0\u6ca1\u529e\u6cd5\u8fd9\u4e48\u6e05\u695a\u7684\u8868\u8fbe\u601d\u8def\u3002<\/p>\n<h2>\u603b\u7ed3<\/h2>\n<p>\u672c\u7bc7\u4e3b\u8981\u8bf4\u4e86\u5faa\u73af\u4f9d\u8d56\u7684\u95ee\u9898\u548c\u89e3\u51b3\u5faa\u73af\u4f9d\u8d56\u7684\u529e\u6cd5\u2014\u2014\u4e09\u7ea7\u7f13\u5b58&#xff0c;AOP\u4e0e\u52a8\u6001\u4ee3\u7406\u4e0b\u4e00\u671f\u518d\u8bf4\u5427&#xff0c;\u4e3b\u5305\u5468\u672b\u6c34\u4e00\u4e0b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb364\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf2\u6b21\u3002\u6458\u8981\uff1aSpring\u901a\u8fc7IOC\u5bb9\u5668\u7ba1\u7406Bean\u751f\u547d\u5468\u671f\uff0cDI\u5b9e\u73b0Bean\u7684\u4f9d\u8d56\u6ce8\u5165\u3002\u5faa\u73af\u4f9d\u8d56\u6307\u591a\u4e2aBean\u76f8\u4e92\u5f15\u7528\u5f62\u6210\u95ed\u73af\uff0cSpring\u91c7\u7528\u4e09\u7ea7\u7f13\u5b58\u673a\u5236\u89e3\u51b3\uff1a\u4e00\u7ea7\u7f13\u5b58\u5b58\u6210\u54c1Bean\uff0c\u4e8c\u7ea7\u5b58\u534a\u6210\u54c1\u65e9\u671f\u5f15\u7528\uff0c\u4e09\u7ea7\u5b58Bean\u5de5\u5382\u7528\u4e8e\u5904\u7406AOP\u4ee3\u7406\u3002\u4e8c\u7ea7\u7f13\u5b58\u53ef\u89e3\u51b3\u57fa\u7840\u5faa\u73af\u4f9d\u8d56\uff0c\u4f46\u4e09\u7ea7\u7f13\u5b58\u80fd\u66f4\u597d\u5904\u7406AOP\u4ee3\u7406\u4e0e\u5faa\u73af\u4f9d\u8d56\u7684\u51b2\u7a81\uff0c\u786e\u4fdd\u4ee3\u7406\u5bf9\u8c61\u7684\u6b63\u786e\u751f\u6210\u548c\u5f15\u7528\u3002\u8be5\u673a\u5236\u901a\u8fc7\u5728Bean\u4e0d\u540c\u751f\u547d\u5468\u671f\u9636\u6bb5\u7684\u5206\u7ea7\u5b58\u50a8\uff0c\u6709\u6548\u89e3\u51b3\u4e86Spring\u4e2d\u7684\u5faa\u73af\u4f9d\u8d56\u95ee\u9898\u3002\uff08149\u5b57\uff09<\/p>\n","protected":false},"author":2,"featured_media":51225,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[99,98,371],"topic":[],"class_list":["post-51228","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-java","tag-spring-boot","tag-371"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SpringBoot\u5b66\u4e60\u65e5\u8bb0\uff08\u4e09\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/51228.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SpringBoot\u5b66\u4e60\u65e5\u8bb0\uff08\u4e09\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb364\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf2\u6b21\u3002\u6458\u8981\uff1aSpring\u901a\u8fc7IOC\u5bb9\u5668\u7ba1\u7406Bean\u751f\u547d\u5468\u671f\uff0cDI\u5b9e\u73b0Bean\u7684\u4f9d\u8d56\u6ce8\u5165\u3002\u5faa\u73af\u4f9d\u8d56\u6307\u591a\u4e2aBean\u76f8\u4e92\u5f15\u7528\u5f62\u6210\u95ed\u73af\uff0cSpring\u91c7\u7528\u4e09\u7ea7\u7f13\u5b58\u673a\u5236\u89e3\u51b3\uff1a\u4e00\u7ea7\u7f13\u5b58\u5b58\u6210\u54c1Bean\uff0c\u4e8c\u7ea7\u5b58\u534a\u6210\u54c1\u65e9\u671f\u5f15\u7528\uff0c\u4e09\u7ea7\u5b58Bean\u5de5\u5382\u7528\u4e8e\u5904\u7406AOP\u4ee3\u7406\u3002\u4e8c\u7ea7\u7f13\u5b58\u53ef\u89e3\u51b3\u57fa\u7840\u5faa\u73af\u4f9d\u8d56\uff0c\u4f46\u4e09\u7ea7\u7f13\u5b58\u80fd\u66f4\u597d\u5904\u7406AOP\u4ee3\u7406\u4e0e\u5faa\u73af\u4f9d\u8d56\u7684\u51b2\u7a81\uff0c\u786e\u4fdd\u4ee3\u7406\u5bf9\u8c61\u7684\u6b63\u786e\u751f\u6210\u548c\u5f15\u7528\u3002\u8be5\u673a\u5236\u901a\u8fc7\u5728Bean\u4e0d\u540c\u751f\u547d\u5468\u671f\u9636\u6bb5\u7684\u5206\u7ea7\u5b58\u50a8\uff0c\u6709\u6548\u89e3\u51b3\u4e86Spring\u4e2d\u7684\u5faa\u73af\u4f9d\u8d56\u95ee\u9898\u3002\uff08149\u5b57\uff09\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/51228.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-10T11:24:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810112424-6898816812dc1.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/51228.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/51228.html\",\"name\":\"SpringBoot\u5b66\u4e60\u65e5\u8bb0\uff08\u4e09\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-10T11:24:27+00:00\",\"dateModified\":\"2025-08-10T11:24:27+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/51228.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/51228.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/51228.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SpringBoot\u5b66\u4e60\u65e5\u8bb0\uff08\u4e09\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SpringBoot\u5b66\u4e60\u65e5\u8bb0\uff08\u4e09\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/51228.html","og_locale":"zh_CN","og_type":"article","og_title":"SpringBoot\u5b66\u4e60\u65e5\u8bb0\uff08\u4e09\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb364\u6b21\uff0c\u70b9\u8d5e17\u6b21\uff0c\u6536\u85cf2\u6b21\u3002\u6458\u8981\uff1aSpring\u901a\u8fc7IOC\u5bb9\u5668\u7ba1\u7406Bean\u751f\u547d\u5468\u671f\uff0cDI\u5b9e\u73b0Bean\u7684\u4f9d\u8d56\u6ce8\u5165\u3002\u5faa\u73af\u4f9d\u8d56\u6307\u591a\u4e2aBean\u76f8\u4e92\u5f15\u7528\u5f62\u6210\u95ed\u73af\uff0cSpring\u91c7\u7528\u4e09\u7ea7\u7f13\u5b58\u673a\u5236\u89e3\u51b3\uff1a\u4e00\u7ea7\u7f13\u5b58\u5b58\u6210\u54c1Bean\uff0c\u4e8c\u7ea7\u5b58\u534a\u6210\u54c1\u65e9\u671f\u5f15\u7528\uff0c\u4e09\u7ea7\u5b58Bean\u5de5\u5382\u7528\u4e8e\u5904\u7406AOP\u4ee3\u7406\u3002\u4e8c\u7ea7\u7f13\u5b58\u53ef\u89e3\u51b3\u57fa\u7840\u5faa\u73af\u4f9d\u8d56\uff0c\u4f46\u4e09\u7ea7\u7f13\u5b58\u80fd\u66f4\u597d\u5904\u7406AOP\u4ee3\u7406\u4e0e\u5faa\u73af\u4f9d\u8d56\u7684\u51b2\u7a81\uff0c\u786e\u4fdd\u4ee3\u7406\u5bf9\u8c61\u7684\u6b63\u786e\u751f\u6210\u548c\u5f15\u7528\u3002\u8be5\u673a\u5236\u901a\u8fc7\u5728Bean\u4e0d\u540c\u751f\u547d\u5468\u671f\u9636\u6bb5\u7684\u5206\u7ea7\u5b58\u50a8\uff0c\u6709\u6548\u89e3\u51b3\u4e86Spring\u4e2d\u7684\u5faa\u73af\u4f9d\u8d56\u95ee\u9898\u3002\uff08149\u5b57\uff09","og_url":"https:\/\/www.wsisp.com\/helps\/51228.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-10T11:24:27+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250810112424-6898816812dc1.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/51228.html","url":"https:\/\/www.wsisp.com\/helps\/51228.html","name":"SpringBoot\u5b66\u4e60\u65e5\u8bb0\uff08\u4e09\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-10T11:24:27+00:00","dateModified":"2025-08-10T11:24:27+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/51228.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/51228.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/51228.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"SpringBoot\u5b66\u4e60\u65e5\u8bb0\uff08\u4e09\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/51228","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=51228"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/51228\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/51225"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=51228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=51228"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=51228"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=51228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}