{"id":551,"date":"2021-09-24T15:37:10","date_gmt":"2021-09-24T07:37:10","guid":{"rendered":"https:\/\/explause.com\/?p=551"},"modified":"2021-09-24T15:37:10","modified_gmt":"2021-09-24T07:37:10","slug":"bean%e5%ae%9a%e4%b9%89%e7%bb%a7%e6%89%bf","status":"publish","type":"post","link":"https:\/\/devdoge.org\/?p=551","title":{"rendered":"Bean\u5b9a\u4e49\u7ee7\u627f"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u5728xml\u5143\u6570\u636e\u6587\u4ef6\u91cc\u9762\u5b9a\u4e49\u4e00\u4e2a\u62bd\u8c61bean\uff0c\u7136\u540e\u522b\u7684bean\u7ee7\u627f\u5b83\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;bean\/&gt;\u5143\u7d20\u8bbe\u7f6e<strong>abstract<\/strong>\u5c5e\u6027\u5373\u53ef\u5c06\u5176\u5b9a\u4e49\u6210\u7236bean\uff08\u62bd\u8c61bean\uff09\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;bean id=\"inheritedTestBean\" abstract=\"true\"\n        class=\"org.springframework.beans.TestBean\"&gt;\n    &lt;property name=\"name\" value=\"parent\"\/&gt;\n    &lt;property name=\"age\" value=\"1\"\/&gt;\n&lt;\/bean&gt;\n\n&lt;bean id=\"inheritsWithDifferentClass\"\n        class=\"org.springframework.beans.DerivedTestBean\"\n        parent=\"inheritedTestBean\" init-method=\"initialize\"&gt;  \n    &lt;property name=\"name\" value=\"override\"\/&gt;\n&lt;\/bean&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b50bean\u8bbe\u7f6eparent\u5c5e\u6027\u5373\u53ef\u7ee7\u627f\u7236bean\u7684\u5185\u5bb9\u3002<br>\u5b50bean\u7ee7\u627fclass\u5c5e\u6027\uff0c\u53ef\u4ee5\u8986\u76d6\uff0c\u4f46\u662f\u8986\u76d6\u7684\u7c7b\u5fc5\u987b\u517c\u5bb9\u7236bean\u7684class\u3002<br>\u5b50bean\u7ee7\u627f\u4f5c\u7528\u57df\u3001\u6784\u9020\u5668\u53c2\u6570\u503c\u3001\u5c5e\u6027\u503c\u548c\u65b9\u6cd5\u8986\u76d6\uff0c\u5e76\u5728\u6b64\u57fa\u7840\u4e0a\u6dfb\u52a0\u65b0\u5185\u5bb9\u3002<br>\u521d\u59cb\u5316\/\u9500\u6bc1\u65b9\u6cd5\u3001\u4f5c\u7528\u57df\u548c\u9759\u6001\u5de5\u5382\u65b9\u6cd5\u53ef\u4ee5\u88ab\u8986\u76d6\u3002<br>\u5b50bean\u7684depends-on\u3001autowire\u3001singleton\u3001lazy-init\u5c5e\u6027\u548c\u4f9d\u8d56\u68c0\u67e5\u4fee\u6539\u4e0d\u751f\u6548\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>xml\u914d\u7f6ebean\u5b9a\u4e49\u6709\u7ee7\u627f\u5173\u7cfb<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[28],"class_list":["post-551","post","type-post","status-publish","format-standard","hentry","category-ioc","tag-ioc"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"_links":{"self":[{"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/posts\/551","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/devdoge.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=551"}],"version-history":[{"count":1,"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/posts\/551\/revisions"}],"predecessor-version":[{"id":552,"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/posts\/551\/revisions\/552"}],"wp:attachment":[{"href":"https:\/\/devdoge.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devdoge.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devdoge.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}