{"id":811,"date":"2023-05-28T02:10:40","date_gmt":"2023-05-27T18:10:40","guid":{"rendered":"https:\/\/xinchewhd.com.cn\/?p=811"},"modified":"2023-05-28T02:10:40","modified_gmt":"2023-05-27T18:10:40","slug":"spring-%e2%91%a4-resource-inject-%e6%b3%a8%e8%a7%a3%e4%be%9d%e8%b5%96%e6%b3%a8%e5%85%a5%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/xinchewhd.com.cn\/index.php\/spring-boot\/spring-%e2%91%a4-resource-inject-%e6%b3%a8%e8%a7%a3%e4%be%9d%e8%b5%96%e6%b3%a8%e5%85%a5%e8%af%a6%e8%a7%a3\/","title":{"rendered":"Spring \u2464 @Resource @Inject \u6ce8\u89e3\u4f9d\u8d56\u6ce8\u5165\u8be6\u89e3"},"content":{"rendered":"<div class='wxsyncmain'>\n<section data-tool=\"mdnice\u7f16\u8f91\u5668\" data-website=\"https:\/\/www.mdnice.com\" style=\"font-size: 16px;color: black;padding: 0px 10px;line-height: 1.6;word-spacing: 0px;letter-spacing: 0px;word-break: break-word;overflow-wrap: break-word;text-align: left;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &quot;PingFang SC&quot;, Cambria, Cochin, Georgia, Times, &quot;Times New Roman&quot;, serif;\">\n<section><mp-common-profile class=\"js_uneditable custom_select_card mp_profile_iframe\" data-pluginname=\"mpprofile\" data-weui-theme=\"light\" data-id=\"MzU5MTg2OTc3Ng==\" data-headimg=\"http:\/\/mmbiz.qpic.cn\/mmbiz_png\/fY4QmJ5a6icHwnQcJNnBTVFbO7UAHRzibLgEmunvgVcWlmluVpicdNkGAiaNROH9RqVgInCazzkMUJQ5OEhdcGvwwA\/0?wx_fmt=png\" data-nickname=\"DevXJava\" data-alias=\"DevXJava\" data-signature=\"Java\u6280\u672f\u5206\u4eab\" data-from=\"0\" data-is_biz_ban=\"0\"><\/mp-common-profile><\/section>\n<figure data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin: 0;margin-top: 10px;margin-bottom: 10px;display: flex;flex-direction: column;justify-content: center;align-items: center;\"><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-cropselx1=\"0\" data-cropselx2=\"558\" data-cropsely1=\"0\" data-cropsely2=\"319\" data-ratio=\"0.5291005291005291\"  data-type=\"png\" data-w=\"567\" style=\"display: block;margin: 0px auto;max-width: 100%;width: 578px;height: 306px;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528020232832.jpg\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"  \/><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-cropselx1=\"0\" data-cropselx2=\"558\" data-cropsely1=\"0\" data-cropsely2=\"319\" data-ratio=\"0.5291005291005291\"  data-type=\"png\" data-w=\"567\" style=\"display: block;margin: 0px auto;max-width: 100%;width: 578px;height: 306px;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528020232832.jpg\"  \/><\/noscript><figcaption style=\"margin-top: 5px;text-align: center;color: #888;font-size: 14px;\"><\/figcaption><\/figure>\n<h1 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 24px;\"><span style=\"display: none;\"><\/span>Spring \u2464 &nbsp;@Resource @Inject \u6ce8\u89e3\u4f9d\u8d56\u6ce8\u5165\u8be6\u89e3<\/h1>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"border-top: none;border-right: none;border-bottom: none;display: block;font-size: 0.9em;overflow: auto;border-left: 3px solid rgba(0, 0, 0, 0.4);background: rgba(0, 0, 0, 0.05);color: rgb(106, 115, 125);padding: 10px 10px 10px 20px;margin-bottom: 20px;margin-top: 20px;\">\n<p style=\"font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;color: black;line-height: 26px;\">Spring \u6e90\u7801\u7cfb\u5217\u6587\u7ae0\u4f1a\u9075\u5faa\u7531\u6d45\u5165\u6df1,\u7531\u6613\u5230\u96be,\u7531\u5b8f\u89c2\u5230\u5fae\u89c2\u7684\u539f\u5219,\u76ee\u6807\u662f\u5c3d\u91cf\u964d\u4f4e\u5b66\u4e60\u96be\u5ea6,\u800c\u4e0d\u662f\u4e00\u4e0a\u6765\u5c31\u8ff7\u5931\u5728\u6e90\u7801\u5f53\u4e2d. \u6587\u7ae0\u4f1a\u4ece\u4e00\u4e2a\u573a\u666f\u4f5c\u4e3a\u51fa\u53d1\u70b9\uff0c\u9488\u5bf9\u6027\u7684\u76ee\u7684\u6027\u6781\u5f3a\u7684\u9488\u5bf9\u8be5\u573a\u666f\u5bf9 Spring \u7684\u5b9e\u73b0\u539f\u7406\uff0c\u6e90\u7801\u8fdb\u884c\u63a2\u7a76\u5b66\u4e60\u3002\u8be5\u7cfb\u5217\u6587\u7ae0\u4f1a\u8ba9\u4f60\u6536\u83b7\u4ec0\u4e48? \u4ece\u5bf9 Spring \u7684\u4f7f\u7528\u8005\u6210\u4e3a Spring \u4e13\u5bb6\u3002\u8be5\u6587\u7ae0\u4f1a\u540c\u6b65\u5728\u5fae\u4fe1\u516c\u4f17\u53f7 \u3010DevXJava\u3011, \u65b9\u4fbf\u5728\u5fae\u4fe1\u5ba2\u6237\u7aef\u9605\u8bfb\u3002<\/p>\n<\/blockquote>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;\">\u672c\u7ae0\u7684\u5185\u5bb9\u662f\u5bf9 bean \u521b\u5efa\u8fc7\u7a0b\u4e2d\u4f9d\u8d56\u9879\u6ce8\u5165\u7684\u63a2\u7a76\uff0c\u9488\u5bf9 <code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">@Resource<\/code> \u548c <code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">@Inject<\/code> (<code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">JSR330<\/code> \u6807\u51c6) \u6ce8\u89e3\u8fdb\u884c\u8bb2\u89e3\u5206\u6790\u3002<\/p>\n<h2 data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 30px;margin-bottom: 15px;padding: 0px;font-weight: bold;color: black;font-size: 22px;\"><span style=\"display: none;\"><\/span><code>@Inject<\/code> \u6ce8\u89e3\u4f9d\u8d56\u6ce8\u5165<\/h2>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"border-top: none;border-right: none;border-bottom: none;display: block;font-size: 0.9em;overflow: auto;border-left: 3px solid rgba(0, 0, 0, 0.4);background: rgba(0, 0, 0, 0.05);color: rgb(106, 115, 125);padding: 10px 10px 10px 20px;margin-bottom: 20px;margin-top: 20px;\">\n<p style=\"font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;color: black;line-height: 26px;\">\u5728\u7b2c4\u7ae0 <a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU5MTg2OTc3Ng==&amp;mid=2247484545&amp;idx=1&amp;sn=4a7eb6e10e0a6ef1a08484cec7f6233a&amp;chksm=fe2926bec95eafa80e638f0bf829671a0495e90889ebdea4ab82ee19a63cfde6ee0bbb35f1a7&amp;token=1444968503&amp;lang=zh_CN&amp;scene=21#wechat_redirect\" style=\"text-decoration: none;color: #1e6bb8;word-wrap: break-word;font-weight: bold;border-bottom: 1px solid #1e6bb8;\" data-linktype=\"2\" target=\"_blank\"  rel=\"nofollow\" ><code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">Spring \u2463 Autowired \u6ce8\u89e3\u4f9d\u8d56\u6ce8\u5165\u8be6\u89e3 | \u770b\u4e0d\u61c2\u4f60\u6253\u6211<\/code><\/a> \u4e2d\u6211\u4eec\u8be6\u7ec6\u5206\u6790\u4e86\u4f7f\u7528 <code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">@Autowired<\/code> \u6ce8\u89e3\u5982\u4f55\u8fdb\u884c\u4f9d\u8d56\u6ce8\u5165\u7684\u8fc7\u7a0b\uff08\u5bf9\u4e8e\u7406\u89e3\u4e86\u4e0a\u671f\u5185\u5bb9\u7684\u8bfb\u8005\uff0c\u672c\u671f\u5185\u5bb9\u5bf9\u4f60\u6765\u8bf4\u4f1a\u662f\u975e\u5e38\u7b80\u5355\u7684\u3002\uff09\u3002\u6838\u5fc3\u662f <code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">AutowiredAnnotationBeanPostProcessor<\/code> \u7684 <code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">postProcessProperties<\/code> \u65b9\u6cd5\u5b9e\u73b0\u7684\u3002<code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">AutowiredAnnotationBeanPostProcessor<\/code> \u4e0d\u4ec5\u652f\u6301\u5904\u7406 <code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">@Autowired<\/code> \u6ce8\u89e3\u540c\u65f6\u4e5f\u652f\u6301 <code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">JSR-330<\/code> \u6807\u51c6\u7684 <code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">@Inject<\/code> \u6ce8\u89e3\u3002\u6240\u4ee5\u5728\u4f7f\u7528\u8fc7\u7a0b\u4e2d <code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">@Autowired<\/code> \u6ce8\u89e3\u548c <code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">@Inject<\/code> \u6ce8\u89e3\u5e76\u6ca1\u6709\u5b9e\u8d28\u4e0a\u7684\u4e0d\u540c\uff0c\u7406\u89e3\u4e86 <code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">@Autowired<\/code> \u7684\u539f\u7406\u4e5f\u5c31\u7406\u89e3\u4e86 <code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">@Inject<\/code> \u3002<\/p>\n<\/blockquote>\n<p data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0;line-height: 26px;color: black;\">\u5728 <code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">AutowiredAnnotationBeanPostProcessor<\/code> \u6784\u9020\u51fd\u6570\u4e2d\u5c06\u652f\u6301\u7684\u6ce8\u89e3\u6dfb\u52a0\u5230 <code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">autowiredAnnotationTypes<\/code> \u4e2d\u3002\u5982\u679c\u9879\u76ee\u4e2d\u5f15\u5165\u4e86 <code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">JSR-330<\/code> \u7684 jar \u5305\u4f1a\u5c06 <code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">@Inject<\/code> \u6ce8\u89e3\u4e5f\u6dfb\u52a0\u8fdb\u53bb\u3002<\/p>\n<pre data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"margin-top: 10px;margin-bottom: 10px;border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;\"><span style=\"display: block;background: url(&quot;https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528020234523.jpeg&quot;) 10px 10px \/ 40px no-repeat rgb(40, 44, 52);height: 30px;width: 100%;margin-bottom: -7px;border-radius: 5px;\"><\/span><code style=\"overflow-x: auto;padding: 16px;color: #abb2bf;display: -webkit-box;font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;font-size: 12px;-webkit-overflow-scrolling: touch;padding-top: 15px;background: #282c34;border-radius: 5px;\">\/**<br  \/> * Obtain a resource object for the given name and type through autowiring<br  \/> * based on the given factory.<br  \/> * @param factory the factory to autowire against<br  \/> * @param element the descriptor for the annotated field\/method<br  \/> * @param requestingBeanName the name of the requesting bean<br  \/> * @return the resource object (never {@code null})<br  \/> * @throws NoSuchBeanDefinitionException if no corresponding target resource found<br  \/> *\/<br  \/>protected Object autowireResource(BeanFactory factory, LookupElement element, @Nullable String requestingBeanName)<br  \/>      throws NoSuchBeanDefinitionException {<br  \/><br  \/>   Object resource;<br  \/>   Set&lt;String&gt; autowiredBeanNames;<br  \/>   String name = element.name;<br  \/><br  \/>   if (factory instanceof AutowireCapableBeanFactory) {<br  \/>      AutowireCapableBeanFactory beanFactory = (AutowireCapableBeanFactory) factory;<br  \/>      DependencyDescriptor descriptor = element.getDependencyDescriptor();<br  \/>      if (this.fallbackToDefaultTypeMatch &amp;&amp; element.isDefaultName &amp;&amp; !factory.containsBean(name)) {<br  \/>         autowiredBeanNames = new LinkedHashSet&lt;&gt;();<br  \/>         resource = beanFactory.resolveDependency(descriptor, requestingBeanName, autowiredBeanNames, null);<br  \/>         if (resource == null) {<br  \/>            throw new NoSuchBeanDefinitionException(element.getLookupType(), \"No resolvable resource object\");<br  \/>         }<br  \/>      }<br  \/>      else {<br  \/>         resource = beanFactory.resolveBeanByName(name, descriptor);<br  \/>         autowiredBeanNames = Collections.singleton(name);<br  \/>      }<br  \/>   }<br  \/>   else {<br  \/>      resource = factory.getBean(name, element.lookupType);<br  \/>      autowiredBeanNames = Collections.singleton(name);<br  \/>   }<br  \/><br  \/>   if (factory instanceof ConfigurableBeanFactory) {<br  \/>      ConfigurableBeanFactory beanFactory = (ConfigurableBeanFactory) factory;<br  \/>      for (String autowiredBeanName : autowiredBeanNames) {<br  \/>         if (requestingBeanName != null &amp;&amp; beanFactory.containsBean(autowiredBeanName)) {<br  \/>            beanFactory.registerDependentBean(autowiredBeanName, requestingBeanName);<br  \/>         }<br  \/>      }<br  \/>   }<br  \/><br  \/>   return resource;<br  \/>}<br  \/><\/code><\/pre>\n<blockquote data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"border-top: none;border-right: none;border-bottom: none;display: block;font-size: 0.9em;overflow: auto;border-left: 3px solid rgba(0, 0, 0, 0.4);background: rgba(0, 0, 0, 0.05);color: rgb(106, 115, 125);padding: 10px 10px 10px 20px;margin-bottom: 20px;margin-top: 20px;\">\n<p style=\"font-size: 16px;padding-top: 8px;padding-bottom: 8px;margin: 0px;color: black;line-height: 26px;\"><code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">@Resource<\/code> \u3001<code style=\"font-size: 14px;word-wrap: break-word;padding: 2px 4px;border-radius: 4px;margin: 0 2px;color: #1e6bb8;background-color: rgba(27,31,35,.05);font-family: Operator Mono, Consolas, Monaco, Menlo, monospace;word-break: break-all;\">@Inject<\/code> \u6ce8\u89e3\u5b9e\u73b0\u4f9d\u8d56\u6ce8\u5165\u7684\u539f\u7406\u548c\u8fc7\u7a0b\u57fa\u672c\u4ecb\u7ecd\u5b8c\u6bd5\uff0c\u66f4\u591a\u7684\u6280\u672f\u539f\u7406\u4f1a\u5728\u7cfb\u5217\u6587\u7ae0\u7684\u540e\u7eed\u5185\u5bb9\u4e2d\u63d0\u4f9b\u3002\u8be5\u6587\u7ae0\u4f1a\u540c\u6b65\u5728\u5fae\u4fe1\u516c\u4f17\u53f7 \u3010DevXJava\u3011, \u65b9\u4fbf\u5728\u5fae\u4fe1\u5ba2\u6237\u7aef\u9605\u8bfb\u3002<\/p>\n<\/blockquote>\n<hr data-tool=\"mdnice\u7f16\u8f91\u5668\" style=\"height: 1px;margin: 10px 0px;border-right: none;border-bottom: none;border-left: none;border-top: 1px solid black;\"  \/>\n<p><br  \/><\/p>\n<p style=\"text-align: center;\"><strong style=\"font-weight: bold;color: black;\">DevXJava \u4e0d\u6b62\u4e8e\u6280\u672f<\/strong><\/p>\n<p><img decoding=\"async\" class=\"rich_pages wxw-img lazyload\" data-ratio=\"1\"  data-type=\"jpeg\" data-w=\"258\" style=\"display: block;margin: 0px auto;max-width: 100%;width: 202px;height: 202px;\" data-src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528020232599.jpeg\" src=\"https:\/\/s.nmxc.ltd\/sakurairo_vision\/@2.6\/load_svg\/inload.svg\" onerror=\"imgError(this)\"><noscript><img decoding=\"async\" class=\"rich_pages wxw-img\" data-ratio=\"1\"  data-type=\"jpeg\" data-w=\"258\" style=\"display: block;margin: 0px auto;max-width: 100%;width: 202px;height: 202px;\" src=\"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528020232599.jpeg\"><\/noscript><\/p>\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:                 DevXJava              <\/p>\n<\/blockquote>\n<\/div>\n","raw":"","protected":false},"excerpt":{"rendered":"<p>Spring \u2464 &nbsp;@Resource @Inject \u6ce8\u89e3\u4f9d\u8d56\u6ce8\u5165\u8be6\u89e3 Spring \u6e90\u7801\u7cfb\u5217\u6587\u7ae0\u4f1a\u9075\u5faa\u7531\u6d45\u5165\u6df1,\u7531\u6613 &#8230;<\/p>\n","protected":false},"author":2,"featured_media":806,"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-811","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\/2023\/05\/20230528020231657-150x150.jpeg","content_first_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528020232832.jpg","post_medium_image_300":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528020231657-300x128.jpeg","post_thumbnail_image_624":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528020231657.jpeg","post_frist_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528020232832.jpg","post_medium_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528020231657-300x128.jpeg","post_large_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528020231657.jpeg","post_full_image":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528020231657.jpeg","post_all_images":[{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528020232832.jpg","id":"image0"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528020232832.jpg","id":"image1"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528020232599.jpeg","id":"image2"},{"imagesurl":"https:\/\/wp-moto-1258805347.cos.ap-shanghai.myqcloud.com\/2023\/05\/20230528020232599.jpeg","id":"image3"}],"videoAdId":"","listAd":"0","listAdId":"","listAdEvery":6,"total_comments":0,"category_name":"Spring Boot","post_date":"2023-05-27","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":314,"next_post_id":535,"next_post_title":"Controller\u5c42\u4ee3\u7801\u5c31\u8be5\u8fd9\u4e48\u5199\uff0c\u7b80\u6d01\u53c8\u4f18\u96c5\uff01","previous_post_id":583,"previous_post_title":"Springboot \u52a8\u6001\u914d\u7f6e\u53ca\u4e00\u952e\u6253\u5305\u90e8\u7f72","_links":{"self":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/811","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\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/comments?post=811"}],"version-history":[{"count":0,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/posts\/811\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media\/806"}],"wp:attachment":[{"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/media?parent=811"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/categories?post=811"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xinchewhd.com.cn\/index.php\/wp-json\/wp\/v2\/tags?post=811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}