{"id":5089,"date":"2024-08-01T22:48:57","date_gmt":"2024-08-01T14:48:57","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=5089"},"modified":"2024-08-01T22:48:57","modified_gmt":"2024-08-01T14:48:57","slug":"%e9%9d%a2%e8%af%95%e5%ae%98%ef%bc%9aspring-bean-%e7%9a%84%e7%94%9f%e5%91%bd%e5%91%a8%e6%9c%9f%e9%83%bd%e4%b8%8d%e4%bc%9a%ef%bc%8c%e4%bd%a0%e8%b5%b0%e5%90%a7%e4%b8%8b%e4%b8%80%e4%bd%8d","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/spring-boot\/%e9%9d%a2%e8%af%95%e5%ae%98%ef%bc%9aspring-bean-%e7%9a%84%e7%94%9f%e5%91%bd%e5%91%a8%e6%9c%9f%e9%83%bd%e4%b8%8d%e4%bc%9a%ef%bc%8c%e4%bd%a0%e8%b5%b0%e5%90%a7%e4%b8%8b%e4%b8%80%e4%bd%8d\/","title":{"rendered":"\u9762\u8bd5\u5b98\uff1aSpring Bean \u7684\u751f\u547d\u5468\u671f\u90fd\u4e0d\u4f1a\uff0c\u4f60\u8d70\u5427\u4e0b\u4e00\u4f4d"},"content":{"rendered":"<div class='wxsyncmain'>\n<section data-tool=\"mdnice\u7f16\u8f91\u5668\" data-website=\"https:\/\/www.mdnice.com\" style=\"margin-bottom: 0px;padding-left: 10px;padding-right: 10px;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;width: auto;font-family: Optima, &quot;Microsoft YaHei&quot;, PingFangSC-regular, serif;font-size: 16px;color: rgb(0, 0, 0);line-height: 1.5em;word-spacing: 0em;letter-spacing: 0em;word-break: break-word;text-align: left;\" data-mpa-powered-by=\"yiban.io\">\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">\u5f15\u8a00\uff1a\u5728\u9762\u8bd5\u4e2d\uff0c\u4e86\u89e3 Spring Bean \u7684\u751f\u547d\u5468\u671f\u662f\u975e\u5e38\u91cd\u8981\u7684\uff0c\u56e0\u4e3a\u5b83\u76f4\u63a5\u6d89\u53ca\u5230\u4e86 Spring \u6846\u67b6\u4e2d\u5bf9\u8c61\u7684\u521b\u5efa\u3001\u521d\u59cb\u5316\u3001\u4f7f\u7528\u548c\u9500\u6bc1\u7b49\u5173\u952e\u8fc7\u7a0b\u3002\u638c\u63e1 Spring Bean \u7684\u751f\u547d\u5468\u671f\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u66f4\u597d\u5730\u7406\u89e3 Spring \u6846\u67b6\u7684\u8fd0\u4f5c\u673a\u5236\uff0c\u4ee5\u53ca\u5982\u4f55\u5728\u5b9e\u9645\u9879\u76ee\u4e2d\u66f4\u597d\u5730\u5229\u7528 Spring \u63d0\u4f9b\u7684\u529f\u80fd\u3002<\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;background-attachment: scroll;background-clip: border-box;background-image: url('https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215338662.png');background-origin: padding-box;background-position: 50% 50%;background-repeat: no-repeat;background-size: 63px;width: auto;height: auto;align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;justify-content: center;line-height: 1.5em;overflow: unset; text-shadow: none;transform: none;-webkit-box-reflect: unset;\"><span style=\"display: none;\"><\/span><span style=\" font-size: 18px;color: rgb(72, 179, 120);line-height: 2.4em;letter-spacing: 0em;margin-top: 38px;margin-bottom: 10px;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: 38px;justify-content: unset;overflow: unset; text-align: center;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; \">\u9898\u76ee<\/span><span style=\"display: none;\"><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">\u9762\u8bd5\u5b98\uff1aSpring Bean \u7684\u751f\u547d\u5468\u671f\u90fd\u4e0d\u4f1a\uff0c\u4f60\u8d70\u5427\u4e0b\u4e00\u4f4d<\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;background-attachment: scroll;background-clip: border-box;background-image: url('https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215338662.png');background-origin: padding-box;background-position: 50% 50%;background-repeat: no-repeat;background-size: 63px;width: auto;height: auto;align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;justify-content: center;line-height: 1.5em;overflow: unset; text-shadow: none;transform: none;-webkit-box-reflect: unset;\"><span style=\"display: none;\"><\/span><span style=\" font-size: 18px;color: rgb(72, 179, 120);line-height: 2.4em;letter-spacing: 0em;margin-top: 38px;margin-bottom: 10px;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: 38px;justify-content: unset;overflow: unset; text-align: center;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; \">\u63a8\u8350\u89e3\u6790<\/span><span style=\"display: none;\"><\/span><\/h2>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\" margin-top: 30px;margin-bottom: 15px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow: unset; text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; \"><span style=\"background-attachment: scroll;background-clip: border-box;background-image: url('https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215338662.png');background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: 15px 15px;width: 15px;height: 15px;align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: inline-block;font-size: 22px;font-weight: bold;flex-direction: unset;float: unset;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-bottom: -2px;overflow: unset; text-indent: 0em;text-shadow: none;transform: none;-webkit-box-reflect: unset;\"><\/span><span style=\"display: none;\"><\/span><span style=\" color: rgb(72, 179, 120);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-left: 8px;overflow: unset; text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; \">Spring \u6846\u67b6\u4e2d Bean \u7684\u751f\u547d\u5468\u671f<\/span><span style=\"display: none;\"><\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">\u5728Spring\u6846\u67b6\u4e2d\uff0cBean\u7684\u751f\u547d\u5468\u671f\u7ecf\u5386\u4ee5\u4e0b\u51e0\u4e2a\u9636\u6bb5\uff1a<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">1\uff09<strong style=\"color: rgb(74, 74, 74);background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;\">\u5b9e\u4f8b\u5316\uff1a<\/strong> Spring \u6839\u636e\u914d\u7f6e\u6587\u4ef6\u6216\u6ce8\u89e3\u7b49\u65b9\u5f0f\u521b\u5efa Bean \u5b9e\u4f8b\uff0c\u5e76\u5c06\u5176\u5b58\u50a8\u5728\u5bb9\u5668\u4e2d\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">2\uff09<strong style=\"color: rgb(74, 74, 74);background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;\">\u5c5e\u6027\u8d4b\u503c\uff1a<\/strong> Spring \u81ea\u52a8\u5c06Bean\u7684\u5c5e\u6027\u503c\u4ece\u914d\u7f6e\u6587\u4ef6\u6216\u6ce8\u89e3\u7b49\u65b9\u5f0f\u4e2d\u6ce8\u5165\u5230 Bean \u5b9e\u4f8b\u4e2d\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">3\uff09<strong style=\"color: rgb(74, 74, 74);background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;\">\u521d\u59cb\u5316\uff1a<\/strong> Spring \u8c03\u7528 Bean \u5b9e\u4f8b\u7684 <code style=\"color: rgb(40, 202, 113);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05);width: auto;height: auto;margin-left: 2px;margin-right: 2px;padding: 2px 4px;border-style: none;border-width: 3px;border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);border-radius: 4px;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">init-method<\/code>\u65b9\u6cd5\uff0c\u5b8c\u6210\u4e00\u4e9b\u521d\u59cb\u5316\u7684\u64cd\u4f5c\uff0c\u4f8b\u5982\u5efa\u7acb\u6570\u636e\u5e93\u8fde\u63a5\u7b49\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">4\uff09<strong style=\"color: rgb(74, 74, 74);background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;\">\u4f7f\u7528\uff1a<\/strong> Bean \u5b9e\u4f8b\u5df2\u7ecf\u53ef\u4ee5\u6b63\u5e38\u4f7f\u7528\uff0c\u4f9b\u5e94\u7528\u7a0b\u5e8f\u8c03\u7528\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">5\uff09<strong style=\"color: rgb(74, 74, 74);background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;\">\u9500\u6bc1\uff1a<\/strong> Spring \u8c03\u7528 Bean \u5b9e\u4f8b\u7684 <code style=\"color: rgb(40, 202, 113);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05);width: auto;height: auto;margin-left: 2px;margin-right: 2px;padding: 2px 4px;border-style: none;border-width: 3px;border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);border-radius: 4px;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">destroy-method<\/code> \u65b9\u6cd5\uff0c\u5b8c\u6210\u4e00\u4e9b\u8d44\u6e90\u7684\u91ca\u653e\u548c\u6e05\u7406\u64cd\u4f5c\uff0c\u4f8b\u5982\u5173\u95ed\u6570\u636e\u5e93\u8fde\u63a5\u7b49\u3002<\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\" margin-top: 30px;margin-bottom: 15px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow: unset; text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; \"><span style=\"background-attachment: scroll;background-clip: border-box;background-image: url('https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215338662.png');background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: 15px 15px;width: 15px;height: 15px;align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: inline-block;font-size: 22px;font-weight: bold;flex-direction: unset;float: unset;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-bottom: -2px;overflow: unset; text-indent: 0em;text-shadow: none;transform: none;-webkit-box-reflect: unset;\"><\/span><span style=\"display: none;\"><\/span><span style=\" color: rgb(72, 179, 120);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-left: 8px;overflow: unset; text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; \">Bean\u751f\u547d\u5468\u671f\u8be6\u89e3<\/span><span style=\"display: none;\"><\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">1\uff09\u89e3\u6790\u7c7b\u5f97\u5230 BeanDefinition\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">2\uff09\u5982\u679c\u6709\u591a\u4e2a\u6784\u9020\u65b9\u6cd5\uff0c\u5219\u63a8\u65ad\u6784\u9020\u65b9\u6cd5\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">3\uff09\u786e\u5b9a\u597d\u6784\u9020\u65b9\u6cd5\u540e\uff0c\u8fdb\u884c\u5b9e\u4f8b\u5316\u5f97\u5230\u4e00\u4e2a\u5bf9\u8c61\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">4\uff09\u5bf9\u5bf9\u8c61\u4e2d\u52a0\u4e86 <code style=\"color: rgb(40, 202, 113);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05);width: auto;height: auto;margin-left: 2px;margin-right: 2px;padding: 2px 4px;border-style: none;border-width: 3px;border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);border-radius: 4px;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">@Autowired<\/code> \u6ce8\u89e3\u7684\u5c5e\u6027\u8fdb\u884c\u5c5e\u6027\u586b\u5145\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">5\uff09\u56de\u8c03 Aware \u65b9\u6cd5\uff0c\u5982 BeanNameAware\uff0cBeanFactoryAware\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">6\uff09\u8c03\u7528 BeanPostProcessor \u7684\u521d\u59cb\u5316\u524d\u7684\u65b9\u6cd5\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">7\uff09\u8c03\u7528\u521d\u59cb\u5316\u65b9\u6cd5\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">8\uff09\u8c03\u7528 BeanPostProcessor \u7684\u521d\u59cb\u5316\u540e\u7684\u65b9\u6cd5\uff0c\u5728\u8fd9\u91cc\u8fdb\u884c AOP\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">9\uff09\u5982\u679c\u5f53\u524d\u521b\u5efa\u7684 Bean \u662f\u5355\u4f8b\u7684\uff0c\u5219\u4f1a\u628a Bean \u653e\u5165\u5355\u4f8b\u6c60\u91cc\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">10\uff09\u4f7f\u7528 Bean\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">11\uff09Spring \u5bb9\u5668\u5173\u95ed\u65f6\u8c03\u7528 DisposableBean \u4e2d\u7684 <code style=\"color: rgb(40, 202, 113);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05);width: auto;height: auto;margin-left: 2px;margin-right: 2px;padding: 2px 4px;border-style: none;border-width: 3px;border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);border-radius: 4px;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">destroy()<\/code> \u65b9\u6cd5\u3002<\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;background-attachment: scroll;background-clip: border-box;background-image: url('https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215338662.png');background-origin: padding-box;background-position: 50% 50%;background-repeat: no-repeat;background-size: 63px;width: auto;height: auto;align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;justify-content: center;line-height: 1.5em;overflow: unset; text-shadow: none;transform: none;-webkit-box-reflect: unset;\"><span style=\"display: none;\"><\/span><span style=\" font-size: 18px;color: rgb(72, 179, 120);line-height: 2.4em;letter-spacing: 0em;margin-top: 38px;margin-bottom: 10px;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: 38px;justify-content: unset;overflow: unset; text-align: center;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; \">Bean\u4f5c\u7528\u57df<\/span><span style=\"display: none;\"><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">Spring \u6846\u67b6\u63d0\u4f9b\u4e86\u4ee5\u4e0b\u51e0\u79cd\u5e38\u89c1\u7684 Bean \u4f5c\u7528\u57df\uff1a<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">1\uff09<strong style=\"color: rgb(74, 74, 74);background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;\">Singleton\uff08\u5355\u4f8b\uff09\uff1a<\/strong> Spring \u9ed8\u8ba4\u7684\u4f5c\u7528\u57df\u3002\u5728 Singleton \u4f5c\u7528\u57df\u4e0b\uff0cSpring \u5bb9\u5668\u53ea\u4f1a\u521b\u5efa Bean \u7684\u4e00\u4e2a\u5b9e\u4f8b\uff0c\u5e76\u5728\u6574\u4e2a\u5e94\u7528\u7a0b\u5e8f\u7684\u751f\u547d\u5468\u671f\u5185\u90fd\u5171\u4eab\u8fd9\u4e2a\u5b9e\u4f8b\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">2\uff09<strong style=\"color: rgb(74, 74, 74);background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;\">Prototype\uff08\u539f\u578b\uff09\uff1a<\/strong> \u6bcf\u6b21\u8bf7\u6c42\u8be5 Bean \u65f6\uff0cSpring \u5bb9\u5668\u90fd\u4f1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5b9e\u4f8b\uff0c\u5e76\u8fd4\u56de\u8be5\u5b9e\u4f8b\u3002\u5373\u6bcf\u6b21\u8c03\u7528 <code style=\"color: rgb(40, 202, 113);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05);width: auto;height: auto;margin-left: 2px;margin-right: 2px;padding: 2px 4px;border-style: none;border-width: 3px;border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);border-radius: 4px;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">getBean()<\/code> \u65b9\u6cd5\u65f6\u90fd\u4f1a\u8fd4\u56de\u4e00\u4e2a\u65b0\u7684 Bean\u5b9e\u4f8b\u3002\u9002\u7528\u4e8e\u90a3\u4e9b\u9700\u8981\u72b6\u6001\u7684 Bean\uff0c\u4f8b\u5982\u63a7\u5236\u5668\u5bf9\u8c61\u3001\u7ebf\u7a0b\u5b89\u5168\u7684\u5bf9\u8c61\u7b49\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">3\uff09<strong style=\"color: rgb(74, 74, 74);background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;\">Request\uff08\u8bf7\u6c42\uff09\uff1a<\/strong> \u5728 Web \u5e94\u7528\u4e2d\uff0c\u6bcf\u4e2aHTTP\u8bf7\u6c42\u90fd\u4f1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Bean \u5b9e\u4f8b\u3002\u8be5\u4f5c\u7528\u57df\u4ec5\u5728 Web \u73af\u5883\u4e2d\u6709\u6548\uff0c\u7528\u4e8e\u5728\u6bcf\u4e2a HTTP \u8bf7\u6c42\u5904\u7406\u671f\u95f4\u521b\u5efa\u65b0\u7684Bean \u5b9e\u4f8b\u3002\u9002\u7528\u4e8e\u90a3\u4e9b\u9700\u8981\u5728\u6bcf\u4e2a\u8bf7\u6c42\u4e2d\u4fdd\u6301\u72b6\u6001\u7684 Bean\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">4\uff09<strong style=\"color: rgb(74, 74, 74);background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;\">Session\uff08\u4f1a\u8bdd\uff09\uff1a<\/strong> \u5728 Web \u5e94\u7528\u4e2d\uff0c\u6bcf\u4e2a\u7528\u6237\u4f1a\u8bdd\u90fd\u4f1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Bean \u5b9e\u4f8b\u3002\u8be5\u4f5c\u7528\u57df\u4ec5\u5728 Web \u73af\u5883\u4e2d\u6709\u6548\uff0c\u7528\u4e8e\u5728\u6bcf\u4e2a\u7528\u6237\u4f1a\u8bdd\u671f\u95f4\u521b\u5efa\u65b0\u7684 Bean \u5b9e\u4f8b\u3002\u9002\u7528\u4e8e\u90a3\u4e9b\u9700\u8981\u5728\u6574\u4e2a\u4f1a\u8bdd\u671f\u95f4\u4fdd\u6301\u72b6\u6001\u7684 Bean\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">5\uff09<strong style=\"color: rgb(74, 74, 74);background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;\">Global Session\uff08\u5168\u5c40\u4f1a\u8bdd\uff09\uff1a<\/strong> \u8be5\u4f5c\u7528\u57df\u4ec5\u5728\u57fa\u4e8e portlet \u7684 Web \u5e94\u7528\u4e2d\u6709\u6548\u3002\u5728 portlet \u73af\u5883\u4e2d\uff0c\u6bcf\u4e2a\u5168\u5c40\u4f1a\u8bdd\u90fd\u4f1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Bean \u5b9e\u4f8b\u3002<\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;background-attachment: scroll;background-clip: border-box;background-image: url('https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215338662.png');background-origin: padding-box;background-position: 50% 50%;background-repeat: no-repeat;background-size: 63px;width: auto;height: auto;align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;justify-content: center;line-height: 1.5em;overflow: unset; text-shadow: none;transform: none;-webkit-box-reflect: unset;\"><span style=\"display: none;\"><\/span><span style=\" font-size: 18px;color: rgb(72, 179, 120);line-height: 2.4em;letter-spacing: 0em;margin-top: 38px;margin-bottom: 10px;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: 38px;justify-content: unset;overflow: unset; text-align: center;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; \">\u5176\u4ed6\u8865\u5145<\/span><span style=\"display: none;\"><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">\u9c7c\u806a\u660e AI \u7684\u56de\u7b54\uff1a<\/p>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 20px;margin-bottom: 20px;padding: 10px 10px 10px 20px;border-top: 3px none rgba(0, 0, 0, 0.4);border-bottom: 3px none rgba(0, 0, 0, 0.4);border-right: 3px none rgba(0, 0, 0, 0.4);border-left-color: rgb(53, 179, 120);border-radius: 0px;background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgb(251, 249, 253);width: auto;height: auto;box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px;overflow: auto;\"><p><span style=\"display: none;color: rgb(0, 0, 0);font-size: 16px;line-height: 1.5em;letter-spacing: 0em;\"><\/span><\/p>\n<p style=\"text-indent: 0em;padding-top: 16px;padding-bottom: 8px;color: rgb(63, 63, 63);font-size: 16px;line-height: 1.8em;letter-spacing: 0.02em;\">\u9c7c\u806a\u660e AI \u5730\u5740\uff1ahttps:\/\/www.yucongming.com\/<\/p>\n<\/blockquote>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">\u5728 Spring \u6846\u67b6\u4e2d\uff0cBean \u7684\u751f\u547d\u5468\u671f\u6307\u7684\u662f\u5728\u5bb9\u5668\u4e2d\u521b\u5efa\u3001\u521d\u59cb\u5316\u3001\u4f7f\u7528\u548c\u9500\u6bc1 Bean \u7684\u6574\u4e2a\u8fc7\u7a0b\u3002Spring \u5bb9\u5668\u8d1f\u8d23\u7ba1\u7406 Bean \u7684\u751f\u547d\u5468\u671f\uff0c\u4e3b\u8981\u5305\u62ec\u4ee5\u4e0b\u51e0\u4e2a\u9636\u6bb5\uff1a<\/p>\n<ol data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 8px;margin-bottom: 8px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;\">\u5b9e\u4f8b\u5316\uff1a\u5bb9\u5668\u6839\u636e\u914d\u7f6e\u4fe1\u606f\u6216\u8005\u6ce8\u89e3\u521b\u5efa Bean \u7684\u5b9e\u4f8b\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;\">\u5c5e\u6027\u8bbe\u7f6e\uff1a\u5bb9\u5668\u5c06 Bean \u7684\u5c5e\u6027\u503c\u6ce8\u5165\u5230 Bean \u5b9e\u4f8b\u4e2d\uff0c\u5305\u62ec\u901a\u8fc7\u6784\u9020\u51fd\u6570\u6ce8\u5165\u3001\u5c5e\u6027\u7684\u6ce8\u5165\u6216\u8005\u5176\u4ed6\u7279\u5b9a\u7684\u6ce8\u5165\u65b9\u5f0f\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;\">\u521d\u59cb\u5316\uff1a\u5728 Bean \u5b9e\u4f8b\u5316\u5e76\u8bbe\u7f6e\u597d\u5c5e\u6027\u4e4b\u540e\uff0cSpring \u5bb9\u5668\u53ef\u4ee5\u8c03\u7528\u7279\u5b9a\u7684\u521d\u59cb\u5316\u65b9\u6cd5\u8fdb\u884c\u4e00\u4e9b\u989d\u5916\u7684\u521d\u59cb\u5316\u5de5\u4f5c\u3002\u8fd9\u4e2a\u521d\u59cb\u5316\u65b9\u6cd5\u53ef\u4ee5\u901a\u8fc7 XML \u914d\u7f6e\u6587\u4ef6\u4e2d\u7684 init-method \u5c5e\u6027\u6216\u8005\u6ce8\u89e3\u4e2d\u7684 <code style=\"background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05);width: auto;margin-left: 2px;margin-right: 2px;padding: 2px 4px;border-style: none;border-width: 3px;border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);border-radius: 4px;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">@PostConstruct<\/code> \u6765\u6307\u5b9a\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;\">\u4f7f\u7528\uff1a\u6b64\u65f6 Bean \u5df2\u7ecf\u5b8c\u5168\u521d\u59cb\u5316\uff0c\u53ef\u4ee5\u88ab\u5e94\u7528\u7a0b\u5e8f\u4f7f\u7528\u4e86\u3002<\/section>\n<\/li>\n<li>\n<section style=\"margin-top: 5px;margin-bottom: 5px;color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;\">\u9500\u6bc1\uff1a\u5f53\u5bb9\u5668\u5173\u95ed\u65f6\uff0c\u6216\u8005\u901a\u8fc7\u7f16\u7a0b\u7684\u65b9\u5f0f\u9500\u6bc1 Bean \u65f6\uff0c\u5bb9\u5668\u4f1a\u8c03\u7528 Bean \u7684\u9500\u6bc1\u65b9\u6cd5\u8fdb\u884c\u8d44\u6e90\u7684\u91ca\u653e\u548c\u6e05\u7406\u5de5\u4f5c\u3002\u8fd9\u4e2a\u9500\u6bc1\u65b9\u6cd5\u53ef\u4ee5\u901a\u8fc7 XML \u914d\u7f6e\u6587\u4ef6\u4e2d\u7684destroy-method \u5c5e\u6027\u6216\u8005\u6ce8\u89e3\u4e2d\u7684 <code style=\"background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05);width: auto;margin-left: 2px;margin-right: 2px;padding: 2px 4px;border-style: none;border-width: 3px;border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);border-radius: 4px;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">@PreDestroy<\/code> \u6765\u6307\u5b9a\u3002<\/section>\n<\/li>\n<\/ol>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">\u5f3a\u8c03\u4ee5\u4e0b\u51e0\u70b9\uff1a<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">1\uff09<strong style=\"color: rgb(74, 74, 74);background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;\">Aware \u56de\u8c03\u65b9\u6cd5\uff1a<\/strong> \u5728 Bean \u5b9e\u4f8b\u5316\u540e\uff0cSpring \u4f1a\u8c03\u7528\u4e00\u4e9b Aware \u63a5\u53e3\u4e2d\u7684\u65b9\u6cd5\uff0c\u5982 BeanNameAware\u3001BeanFactoryAware \u7b49\uff0c\u8ba9 Bean \u53ef\u4ee5\u611f\u77e5\u5230\u81ea\u5df1\u7684\u4e00\u4e9b\u73af\u5883\u4fe1\u606f\u6216\u5bb9\u5668\u7684\u5b58\u5728\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">2\uff09<strong style=\"color: rgb(74, 74, 74);background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;\">BeanPostProcessor \u7684\u4f5c\u7528\uff1a<\/strong> BeanPostProcessor \u63a5\u53e3\u63d0\u4f9b\u4e86\u5728 Bean \u5b9e\u4f8b\u5316\u4e4b\u540e\u548c\u521d\u59cb\u5316\u4e4b\u524d\u4ee5\u53ca\u521d\u59cb\u5316\u4e4b\u540e\u7684\u56de\u8c03\u65b9\u6cd5\uff0c\u5141\u8bb8\u5f00\u53d1\u8005\u5728 Bean \u521d\u59cb\u5316\u7684\u4e0d\u540c\u9636\u6bb5\u8fdb\u884c\u4e00\u4e9b\u81ea\u5b9a\u4e49\u7684\u64cd\u4f5c\uff0c\u4f8b\u5982 AOP \u529f\u80fd\u5c31\u662f\u901a\u8fc7 BeanPostProcessor \u5b9e\u73b0\u7684\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">3\uff09<strong style=\"color: rgb(74, 74, 74);background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;\">DisposableBean \u548c InitializingBean \u63a5\u53e3\uff1a<\/strong> \u8fd9\u4e24\u4e2a\u63a5\u53e3\u5206\u522b\u5b9a\u4e49\u4e86\u5728 Bean \u9500\u6bc1\u524d\u548c\u521d\u59cb\u5316\u540e\u7684\u64cd\u4f5c\u65b9\u6cd5\u3002\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u5efa\u8bae\u4f7f\u7528\u6ce8\u89e3\u65b9\u5f0f (<code style=\"color: rgb(40, 202, 113);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05);width: auto;height: auto;margin-left: 2px;margin-right: 2px;padding: 2px 4px;border-style: none;border-width: 3px;border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);border-radius: 4px;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">@PostConstruct<\/code> \u548c <code style=\"color: rgb(40, 202, 113);font-size: 14px;line-height: 1.8em;letter-spacing: 0em;background: none 0% 0% \/ auto no-repeat scroll padding-box border-box rgba(27, 31, 35, 0.05);width: auto;height: auto;margin-left: 2px;margin-right: 2px;padding: 2px 4px;border-style: none;border-width: 3px;border-color: rgb(0, 0, 0) rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);border-radius: 4px;font-family: &quot;Operator Mono&quot;, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">@PreDestroy<\/code>) \u6765\u66ff\u4ee3\u8fd9\u4e24\u4e2a\u63a5\u53e3\uff0c\u56e0\u4e3a\u6ce8\u89e3\u65b9\u5f0f\u66f4\u52a0\u7075\u6d3b\u548c\u65b9\u4fbf\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">4\uff09<strong style=\"color: rgb(74, 74, 74);background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;\">Bean \u4f5c\u7528\u57df\u7684\u9009\u62e9\uff1a<\/strong> \u5728\u4f7f\u7528 Bean \u65f6\uff0c\u8981\u6839\u636e\u5b9e\u9645\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u4f5c\u7528\u57df\u3002Singleton \u9002\u7528\u4e8e\u90a3\u4e9b\u65e0\u72b6\u6001\u7684 Bean\uff0cPrototype \u9002\u7528\u4e8e\u6709\u72b6\u6001\u7684 Bean\uff0c\u800c Request \u548c Session \u5219\u9002\u7528\u4e8e Web \u5e94\u7528\u4e2d\u9700\u8981\u4fdd\u6301\u72b6\u6001\u7684 Bean\u3002Global Session \u5219\u9002\u7528\u4e8e\u7279\u5b9a\u7684 Web \u73af\u5883\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">5\uff09<strong style=\"color: rgb(74, 74, 74);background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;width: auto;height: auto;border-style: none;border-width: 3px;border-color: rgba(0, 0, 0, 0.4);border-radius: 0px;\">Spring \u5bb9\u5668\u7ba1\u7406 Bean \u751f\u547d\u5468\u671f\u7684\u597d\u5904\uff1a<\/strong> Spring \u5bb9\u5668\u8d1f\u8d23\u7ba1\u7406 Bean \u7684\u751f\u547d\u5468\u671f\uff0c\u4f7f\u5f97\u5f00\u53d1\u8005\u53ef\u4ee5\u4e13\u6ce8\u4e8e\u4e1a\u52a1\u903b\u8f91\u800c\u4e0d\u7528\u5173\u5fc3\u5bf9\u8c61\u7684\u521b\u5efa\u3001\u521d\u59cb\u5316\u548c\u9500\u6bc1\u8fc7\u7a0b\uff0c\u540c\u65f6\u4e5f\u63d0\u4f9b\u4e86\u7075\u6d3b\u7684\u6269\u5c55\u673a\u5236\uff0c\u53ef\u4ee5\u901a\u8fc7\u5404\u79cd\u6269\u5c55\u70b9\u6765\u5b9e\u73b0\u81ea\u5b9a\u4e49\u7684\u903b\u8f91\u3002<\/p>\n<h3 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\" margin-top: 30px;margin-bottom: 15px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;flex-direction: unset;float: unset;height: auto;justify-content: unset;line-height: 1.5em;overflow: unset; text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; \"><span style=\"background-attachment: scroll;background-clip: border-box;background-image: url('https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215338662.png');background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: 15px 15px;width: 15px;height: 15px;align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: inline-block;font-size: 22px;font-weight: bold;flex-direction: unset;float: unset;justify-content: unset;letter-spacing: 0px;line-height: 1.5em;margin-bottom: -2px;overflow: unset; text-indent: 0em;text-shadow: none;transform: none;-webkit-box-reflect: unset;\"><\/span><span style=\"display: none;\"><\/span><span style=\" color: rgb(72, 179, 120);line-height: 1.5em;letter-spacing: 0em;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: auto;justify-content: unset;margin-left: 8px;overflow: unset; text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; \">\u63a8\u8350\u6587\u7ae0\u548c\u4e66\u7c4d<\/span><span style=\"display: none;\"><\/span><\/h3>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">\u6587\u7ae0\uff1ahttps:\/\/zhuanlan.zhihu.com\/p\/86293659<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">\u4e66\u7c4d\uff1a\u300a Java \u6838\u5fc3\u6280\u672f\u5377 I \u300b<\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;background-attachment: scroll;background-clip: border-box;background-image: url('https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215338662.png');background-origin: padding-box;background-position: 50% 50%;background-repeat: no-repeat;background-size: 63px;width: auto;height: auto;align-items: unset;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;box-shadow: none;display: flex;flex-direction: unset;float: unset;justify-content: center;line-height: 1.5em;overflow: unset; text-shadow: none;transform: none;-webkit-box-reflect: unset;\"><span style=\"display: none;\"><\/span><span style=\" font-size: 18px;color: rgb(72, 179, 120);line-height: 2.4em;letter-spacing: 0em;margin-top: 38px;margin-bottom: 10px;border-style: none;border-width: 1px;border-color: rgb(0, 0, 0);border-radius: 0px;align-items: unset;background-attachment: scroll;background-clip: border-box;background-image: none;background-origin: padding-box;background-position: 0% 0%;background-repeat: no-repeat;background-size: auto;box-shadow: none;display: inline-block;font-weight: bold;flex-direction: unset;float: unset;height: 38px;justify-content: unset;overflow: unset; text-align: center;text-indent: 0em;text-shadow: none;transform: none;width: auto;-webkit-box-reflect: unset; \">\u6b22\u8fce\u4ea4\u6d41<\/span><span style=\"display: none;\"><\/span><\/h2>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">\u5f53\u8c08\u5230 Bean \u7684\u751f\u547d\u5468\u671f\u65f6\uff0c\u6211\u4eec\u53ef\u4ee5\u63a2\u8ba8\u4ee5\u4e0b\u51e0\u4e2a\u95ee\u9898\uff1a<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">1\uff09\u5982\u4f55\u786e\u4fdd Bean \u7684\u6b63\u786e\u5b9e\u4f8b\u5316\u548c\u521d\u59cb\u5316\uff1f<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">2\uff09Bean \u7684\u751f\u547d\u5468\u671f\u4e2d\u54ea\u4e9b\u9636\u6bb5\u53ef\u80fd\u5b58\u5728\u6f5c\u5728\u7684\u5b89\u5168\u98ce\u9669\uff1f<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">3\uff09\u5982\u4f55\u901a\u8fc7\u914d\u7f6e\u548c\u7f16\u7a0b\u624b\u6bb5\u6765\u52a0\u5f3a\u5bf9 Bean \u751f\u547d\u5468\u671f\u7684\u7ba1\u7406\u548c\u76d1\u63a7\uff0c\u4ee5\u9632\u6b62\u6f5c\u5728\u7684\u5b89\u5168\u6f0f\u6d1e\uff1f<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">\u8fd9\u4e9b\u95ee\u9898\u5c06\u6709\u52a9\u4e8e\u6211\u4eec\u6df1\u5165\u4e86\u89e3 Bean \u5728\u5e94\u7528\u4e2d\u7684\u8fd0\u884c\u8fc7\u7a0b\uff0c\u4ee5\u53ca\u5982\u4f55\u5728\u5176\u4e2d\u52a0\u5f3a\u5b89\u5168\u6027\u63aa\u65bd\uff0c\u4fdd\u969c\u7cfb\u7edf\u7684\u7a33\u5b9a\u6027\u548c\u5b89\u5168\u6027\u3002<\/p>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\"><span style=\"color: rgb(51, 51, 51);font-family: &quot;Open Sans&quot;, &quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;Segoe UI Emoji&quot;, sans-serif;font-size: 16px;letter-spacing: normal;orphans: 4;text-align: start;white-space: pre-wrap;background-color: rgb(255, 255, 255);\">\u70b9\u71c3\u6c42\u804c\u70ed\u60c5\uff01\u6bcf\u5468\u6301\u7eed\u66f4\u65b0\uff0c\u6d77\u91cf\u9762\u8bd5\u9898\u548c\u5927\u5382\u9762\u7ecf\u7b49\u4f60\u6311\u6218\uff01\u8d76\u7d27\u5173\u6ce8\u9762\u8bd5\u9e2d\u516c\u4f17\u53f7\uff0c\u8f7b\u677e\u5907\u6218\u6625\u62db\u548c\u6691\u671f\u5b9e\u4e60\uff01<\/span><\/p>\n<section class=\"mp_profile_iframe_wrp\"><mp-common-profile class=\"js_uneditable custom_select_card mp_profile_iframe\" data-pluginname=\"mpprofile\" data-id=\"Mzg4MjcxNzc4Nw==\" data-headimg=\"http:\/\/mmbiz.qpic.cn\/mmbiz_png\/0ibmOSM765AibCusQZAib2iblYibaB5qCxd3JDsEC51wuceM17M0ibiatm0Nd7vwqDY4vE2oVjRpOeOvzgMGDiaTVSaSHw\/0?wx_fmt=png\" data-nickname=\"\u9762\u8bd5\u9e2d\" data-alias=\"mianshiya\" data-signature=\"\u6d77\u91cf\u9762\u8bd5\u9898\u89e3\u548c\u4f18\u8d28\u9762\u7ecf\uff0c\u52a9\u4f60\u901a\u8fc7\u9762\u8bd5\u9e2d\uff01\" data-from=\"0\" data-is_biz_ban=\"0\"><\/mp-common-profile><\/section>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">\n<section data-recommend-type=\"list-title\" data-recommend-tid=\"6\" data-mpa-template=\"t\" style=\"width: 100%;display: flex;justify-content: center;align-items: center;\" data-mid=\"\" data-from=\"yb-recommend\">\n<section style=\"width: 100%;padding: 14px;background: rgb(255, 255, 255);border-radius: 3px;border-width: 1px;border-style: solid;border-color: rgb(232, 232, 235);\" data-mid=\"\">\n<section style=\"width: 100%;display: flex;justify-content: center;align-items: center;align-items: flex-end;\" data-mid=\"\">\n<section data-mid=\"\" style=\"height: 28px;padding: 4px 22px;font-size: 14px;font-weight: 500;color: rgb(19, 52, 86);line-height: 20px;background-image: url('https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215338662.png');background-repeat: no-repeat;background-size: 100% 100%;margin-bottom: -14px;z-index: 10;\">\n<p data-mid=\"\">\u5f80\u671f\u63a8\u8350<\/p>\n<\/section>\n<\/section>\n<section style=\"width: 100%;border-width: 1px;border-style: solid;border-color: rgb(198, 226, 255);padding: 17px 16px 9px;\" data-mid=\"\">\n<section data-mpa-template=\"t\" data-recommend-article-type=\"list-title\" data-recomment-template-id=\"6\" data-recommend-article-id=\"2247488877_1\" data-recommend-article-time=\"1716723000\" data-recommend-article-cover=\"https:\/\/mmbiz.qpic.cn\/mmbiz_jpg\/0ibmOSM765A9GYmuPBF9UllWelXpxo0VBnGwv89bqrZ3icsSUKt6qvOuq0N71aiaEko3mlRPnSiaf8UnR5YgFOic1Ig\/0?wx_fmt=jpeg\" data-recommend-article-title=\"\u4e3a\u4ec0\u4e48\u65b0\u751f\u4ee3\u53c8\u8981\u5206 s1\u3001s2 \u548c eden\uff1f\" data-recommend-article-content-url=\"https:\/\/mp.weixin.qq.com\/s?__biz=Mzg4MjcxNzc4Nw==&amp;mid=2247488877&amp;idx=1&amp;sn=ea8925ed0c4847cadbb50f3a866c0ad7&amp;chksm=cf533059f824b94ff7393940b088494c999d9f731c11c62322a32e178b09210b353e5a2ace24#rd\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=Mzg4MjcxNzc4Nw==&amp;mid=2247488877&amp;idx=1&amp;sn=ea8925ed0c4847cadbb50f3a866c0ad7&amp;chksm=cf533059f824b94ff7393940b088494c999d9f731c11c62322a32e178b09210b353e5a2ace24&amp;scene=21#wechat_redirect\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" ><\/p>\n<section data-recommend-title=\"t\" data-recommend-content=\"t\" style=\"width: 100%;display: flex;justify-content: center;align-items: center;flex-wrap: nowrap;border-bottom: 1px dashed #c6e2ff;padding: 6px;font-size: 13px;font-weight: 400;color: #2c5f95;line-height: 18px;\" data-mid=\"\">\n<p data-mid=\"\">\u4e3a\u4ec0\u4e48\u65b0\u751f\u4ee3\u53c8\u8981\u5206 s1\u3001s2 \u548c eden\uff1f<\/p>\n<\/section>\n<p><\/a><\/section>\n<section data-mpa-template=\"t\" data-recommend-article-type=\"list-title\" data-recomment-template-id=\"6\" data-recommend-article-id=\"2247488861_1\" data-recommend-article-time=\"1716636600\" data-recommend-article-cover=\"https:\/\/mmbiz.qpic.cn\/mmbiz_jpg\/0ibmOSM765Aibic16K0Iic3xKViblHPAF23DXoGv4JyaQj0hvPiaMj5tugyiahx8uib3v2w5ibbATf1w5dyEmFe6VayFiaUQ\/0?wx_fmt=jpeg\" data-recommend-article-title=\"Cookie\u3001Session\u3001Token \u4e4b\u95f4\u6709\u4ec0\u4e48\u533a\u522b\uff1f\" data-recommend-article-content-url=\"https:\/\/mp.weixin.qq.com\/s?__biz=Mzg4MjcxNzc4Nw==&amp;mid=2247488861&amp;idx=1&amp;sn=1516bf02a4010cfcf76aba88ae49a085&amp;chksm=cf533069f824b97f25e7e7d598f904c852cbe205ad6f39db1aefdf3822000c31741eb89ac51a#rd\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=Mzg4MjcxNzc4Nw==&amp;mid=2247488861&amp;idx=1&amp;sn=1516bf02a4010cfcf76aba88ae49a085&amp;chksm=cf533069f824b97f25e7e7d598f904c852cbe205ad6f39db1aefdf3822000c31741eb89ac51a&amp;scene=21#wechat_redirect\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" ><\/p>\n<section data-recommend-title=\"t\" data-recommend-content=\"t\" style=\"width: 100%;display: flex;justify-content: center;align-items: center;flex-wrap: nowrap;border-bottom: 1px dashed #c6e2ff;padding: 6px;font-size: 13px;font-weight: 400;color: #2c5f95;line-height: 18px;\" data-mid=\"\">\n<p data-mid=\"\">Cookie\u3001Session\u3001Token \u4e4b\u95f4\u6709\u4ec0\u4e48\u533a\u522b\uff1f<\/p>\n<\/section>\n<p><\/a><\/section>\n<section data-mpa-template=\"t\" data-recommend-article-type=\"list-title\" data-recomment-template-id=\"6\" data-recommend-article-id=\"2247488823_1\" data-recommend-article-time=\"1716463800\" data-recommend-article-cover=\"https:\/\/mmbiz.qpic.cn\/mmbiz_jpg\/0ibmOSM765AibmN0YoFiciaCK4gibibjMOrX0RLtgs7G1CD7G9h5BKK8vHTkclOcicgJXwekEQ2eV1zWD9Y7nvWSanLyw\/0?wx_fmt=jpeg\" data-recommend-article-title=\"\u9762\u8bd5\u5b98\u8bf4\u8981\u538b\u6d4b\u6211\u7684\u7f51\u7ad9\uff0c\u6211\u88ab\u538b\u529b\u4e86\uff01\" data-recommend-article-content-url=\"https:\/\/mp.weixin.qq.com\/s?__biz=Mzg4MjcxNzc4Nw==&amp;mid=2247488823&amp;idx=1&amp;sn=9e1289a5ef7e548e981636da89417a9a&amp;chksm=cf533003f824b9158cb8088df45305104e5ebab7e29fd986dfd001aa3fbb2677430bfd5fc418#rd\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=Mzg4MjcxNzc4Nw==&amp;mid=2247488823&amp;idx=1&amp;sn=9e1289a5ef7e548e981636da89417a9a&amp;chksm=cf533003f824b9158cb8088df45305104e5ebab7e29fd986dfd001aa3fbb2677430bfd5fc418&amp;scene=21#wechat_redirect\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" ><\/p>\n<section data-recommend-title=\"t\" data-recommend-content=\"t\" style=\"width: 100%;display: flex;justify-content: center;align-items: center;flex-wrap: nowrap;border-bottom: 1px dashed #c6e2ff;padding: 6px;font-size: 13px;font-weight: 400;color: #2c5f95;line-height: 18px;\" data-mid=\"\">\n<p data-mid=\"\">\u9762\u8bd5\u5b98\u8bf4\u8981\u538b\u6d4b\u6211\u7684\u7f51\u7ad9\uff0c\u6211\u88ab\u538b\u529b\u4e86\uff01<\/p>\n<\/section>\n<p><\/a><\/section>\n<section data-mpa-template=\"t\" data-recommend-article-type=\"list-title\" data-recomment-template-id=\"6\" data-recommend-article-id=\"2247488804_1\" data-recommend-article-time=\"1716377400\" data-recommend-article-cover=\"https:\/\/mmbiz.qpic.cn\/mmbiz_jpg\/0ibmOSM765A8Z1lRnxlibPAlQ65WBITUObIDtPnxG1cAIXVMB3StlRcDX5tREWosRRZ03FLVkeIK0JYlp34Vz9NQ\/0?wx_fmt=jpeg\" data-recommend-article-title=\"\u9762\u8bd5\u95ee Redis \u7684\u5b57\u7b26\u4e32\u539f\u7406\u662f\u4ec0\u4e48\uff1f\u7b54\u4e0d\u51fa\u88ab Pass \u4e86\uff01\" data-recommend-article-content-url=\"https:\/\/mp.weixin.qq.com\/s?__biz=Mzg4MjcxNzc4Nw==&amp;mid=2247488804&amp;idx=1&amp;sn=479c08a569c4c24d965b21f3913e05b7&amp;chksm=cf533010f824b906e9a96336e974ec82805c4156358597961eefef7dc8e9c669bbb5ffbb2f0d#rd\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=Mzg4MjcxNzc4Nw==&amp;mid=2247488804&amp;idx=1&amp;sn=479c08a569c4c24d965b21f3913e05b7&amp;chksm=cf533010f824b906e9a96336e974ec82805c4156358597961eefef7dc8e9c669bbb5ffbb2f0d&amp;scene=21#wechat_redirect\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" ><\/p>\n<section data-recommend-title=\"t\" data-recommend-content=\"t\" style=\"width: 100%;display: flex;justify-content: center;align-items: center;flex-wrap: nowrap;border-bottom: 1px dashed #c6e2ff;padding: 6px;font-size: 13px;font-weight: 400;color: #2c5f95;line-height: 18px;\" data-mid=\"\">\n<p data-mid=\"\">\u9762\u8bd5\u95ee Redis \u7684\u5b57\u7b26\u4e32\u539f\u7406\u662f\u4ec0\u4e48\uff1f\u7b54\u4e0d\u51fa\u88ab Pass \u4e86\uff01<\/p>\n<\/section>\n<p><\/a><\/section>\n<section data-mpa-template=\"t\" data-recommend-article-type=\"list-title\" data-recomment-template-id=\"6\" data-recommend-article-id=\"2247488685_1\" data-recommend-article-time=\"1715859000\" data-recommend-article-cover=\"https:\/\/mmbiz.qpic.cn\/mmbiz_jpg\/0ibmOSM765A9H8neOFQaoVPuGeM2vyAkYhe9JBoDrGwFiaPLmdW8kW9xN6pJs12ltlu1MDaVFhvXfFQMQHPr7Uibw\/0?wx_fmt=jpeg\" data-recommend-article-title=\"\u9762\u8bd5\u5b98\u542c\u5230\u6211\u5bf9 explain \u4f7f\u7528\u7684\u56de\u7b54\u7ad6\u8d77\u4e86\u5927\u62c7\u6307\" data-recommend-article-content-url=\"https:\/\/mp.weixin.qq.com\/s?__biz=Mzg4MjcxNzc4Nw==&amp;mid=2247488685&amp;idx=1&amp;sn=c132c316ac7bd68f27dfc24f1e25185d&amp;chksm=cf533199f824b88fe9aad296ca4e5baefbbde95561194a0d9a48c4ef713422190bf76ceb4794#rd\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=Mzg4MjcxNzc4Nw==&amp;mid=2247488685&amp;idx=1&amp;sn=c132c316ac7bd68f27dfc24f1e25185d&amp;chksm=cf533199f824b88fe9aad296ca4e5baefbbde95561194a0d9a48c4ef713422190bf76ceb4794&amp;scene=21#wechat_redirect\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" ><\/p>\n<section data-recommend-title=\"t\" data-recommend-content=\"t\" style=\"width: 100%;display: flex;justify-content: center;align-items: center;flex-wrap: nowrap;border-bottom: 1px dashed #c6e2ff;padding: 6px;font-size: 13px;font-weight: 400;color: #2c5f95;line-height: 18px;\" data-mid=\"\">\n<p data-mid=\"\">\u9762\u8bd5\u5b98\u542c\u5230\u6211\u5bf9 explain \u4f7f\u7528\u7684\u56de\u7b54\u7ad6\u8d77\u4e86\u5927\u62c7\u6307<\/p>\n<\/section>\n<p><\/a><\/section>\n<section data-mpa-template=\"t\" data-recommend-article-type=\"list-title\" data-recomment-template-id=\"6\" data-recommend-article-id=\"2247488352_1\" data-recommend-article-time=\"1712835000\" data-recommend-article-cover=\"https:\/\/mmbiz.qpic.cn\/mmbiz_jpg\/0ibmOSM765AibCEX0PsP5BkAia8AenhFiaR1wbmm4asZcgjouZL2rFkvmVciaYyyTX668ngfHnHV5AA6AYKaglib7nLA\/0?wx_fmt=jpeg\" data-recommend-article-title=\"\u9762\u8bd5\u5b98\uff1aMySQL \u5355\u8868\u4e3a\u4ec0\u4e48\u4e0d\u8981\u8d85\u8fc7 2000W \u884c\uff1f\u3002\u3002\" data-recommend-article-content-url=\"https:\/\/mp.weixin.qq.com\/s?__biz=Mzg4MjcxNzc4Nw==&amp;mid=2247488352&amp;idx=1&amp;sn=f2c90c0fc6f71dc8afa899ddfb7106c8&amp;chksm=cf533654f824bf4227bbf4b0b2b55b356d0d4b6ee0abb61d502b38e59c72e3f5d4bd88222a75#rd\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=Mzg4MjcxNzc4Nw==&amp;mid=2247488352&amp;idx=1&amp;sn=f2c90c0fc6f71dc8afa899ddfb7106c8&amp;chksm=cf533654f824bf4227bbf4b0b2b55b356d0d4b6ee0abb61d502b38e59c72e3f5d4bd88222a75&amp;scene=21#wechat_redirect\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" ><\/p>\n<section data-recommend-title=\"t\" data-recommend-content=\"t\" style=\"width: 100%;display: flex;justify-content: center;align-items: center;flex-wrap: nowrap;border-bottom: 1px dashed #c6e2ff;padding: 6px;font-size: 13px;font-weight: 400;color: #2c5f95;line-height: 18px;border-bottom:none !important;\" data-mid=\"\">\n<p data-mid=\"\">\u9762\u8bd5\u5b98\uff1aMySQL \u5355\u8868\u4e3a\u4ec0\u4e48\u4e0d\u8981\u8d85\u8fc7 2000W \u884c\uff1f\u3002\u3002<\/p>\n<\/section>\n<p><\/a><\/section>\n<\/section>\n<\/section>\n<\/section>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"color: rgb(63, 63, 63);line-height: 1.8em;letter-spacing: 0.02em;text-indent: 0em;padding-top: 16px;padding-bottom: 8px;\">\n<\/section>\n<p style=\"display: none;\"><mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n<blockquote>\n<p>\u672c\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e\u5fae\u4fe1\u516c\u4f17\u53f7:                 \u9762\u8bd5\u9e2d              <\/p>\n<\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>\u5f15\u8a00\uff1a\u5728\u9762\u8bd5\u4e2d\uff0c\u4e86\u89e3 Spring Bean \u7684\u751f\u547d\u5468\u671f\u662f\u975e\u5e38\u91cd\u8981\u7684\uff0c\u56e0\u4e3a\u5b83\u76f4\u63a5\u6d89\u53ca\u5230\u4e86 Spring \u6846\u67b6\u4e2d\u5bf9\u8c61\u7684\u521b\u5efa\u3001\u521d\u59cb\u5316\u3001 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":5086,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-5089","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-spring-boot"],"post_thumbnail_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215340278-150x150.jpeg","content_first_image":null,"post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215340278-300x128.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215340278.jpeg","post_frist_image":null,"post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215340278-300x128.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215340278.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2024\/08\/20240801215340278.jpeg","post_all_images":[],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Spring Boot","post_date":"2024-08-01","like_count":"0","praiseWord":"\u9f13\u52b1","copyright_state":"","excitationAd":"0","rewardedVideoAdId":"","detailAdId":"","detailAd":"0","enterpriseMinapp":"0","audios":[],"postImageUrl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230519082947553.jpg","avatarurls":[],"related_posts":null,"pageviews":372,"next_post_id":4876,"next_post_title":"SpringBoot \u52a8\u6001\u52a0\u8f7d Jar \u5305\uff0c\u73a9\u8f6c\u52a8\u6001\u914d\u7f6e\uff01","previous_post_id":4882,"previous_post_title":"Java \u6d41\u5a92\u4f53\u670d\u52a1\u6846\u67b6 ZLM4J \u53d1\u5e03 1.0.8 \u7248\u672c","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/5089","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=5089"}],"version-history":[{"count":2,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/5089\/revisions"}],"predecessor-version":[{"id":6421,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/5089\/revisions\/6421"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/5086"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=5089"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=5089"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=5089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}