{"id":316,"date":"2022-04-08T23:43:55","date_gmt":"2022-04-08T15:43:55","guid":{"rendered":"https:\/\/blog.lijiajia.top\/?p=316"},"modified":"2026-06-19T21:38:09","modified_gmt":"2026-06-19T13:38:09","slug":"spring5%e6%a1%86%e6%9e%b6%e5%ad%a6%e4%b9%a0%ef%bc%9a%e6%96%b0%e5%8a%9f%e8%83%bd-nullable%e6%b3%a8%e8%a7%a3%e4%ba%8c%e5%8d%81%e5%9b%9b","status":"publish","type":"post","link":"https:\/\/blog.ttwow.top\/?p=316","title":{"rendered":"Spring5\u6846\u67b6\u5b66\u4e60\uff1a\u65b0\u529f\u80fd-@Nullable\u6ce8\u89e3(\u4e8c\u5341\u56db)"},"content":{"rendered":"<p>3\u3001Spring5\u6846\u67b6\u6838\u5fc3\u5bb9\u5668\u652f\u6301@Nullable\u6ce8\u89e3<br \/>\n(1)@Nullable\u6ce8\u89e3\u53ef\u4ee5\u4f7f\u7528\u5728\u65b9\u6cd5\u4e0a\u9762\uff0c\u5c5e\u6027\u4e0a\u9762\uff0c\u53c2\u6570\u4e0a\u9762\uff0c\u8868\u793a\u65b9\u6cd5\u8fd4\u56de\u53ef\u4ee5\u4e3a\u7a7a\uff0c\u5c5e\u6027\u503c\u53ef\u4ee5\u4e3a\u7a7a\uff0c\u53c2\u6570\u503c\u53ef\u4ee5\u4e3a\u7a7a<\/p>\n<p>(2)\u6ce8\u89e3\u7528\u5728\u65b9\u6cd5\u4e0a\u9762\uff0c\u65b9\u6cd5\u8fd4\u56de\u503c\u53ef\u4ee5\u4e3a\u7a7a<\/p>\n<pre><code class=\"language-java\">@Nullable\n    String getId();<\/code><\/pre>\n<p>(3)\u6ce8\u89e3\u4f7f\u7528\u5728\u65b9\u6cd5\u53c2\u6570\u91cc\u9762\uff0c\u65b9\u6cd5\u53c2\u6570\u53ef\u4ee5\u4e3a\u7a7a<\/p>\n<pre><code class=\"language-java\">  public &lt;T&gt; void registerBean(@Nullable String beanName, Class&lt;T&gt; beanClass, @Nullable Supplier&lt;T&gt; supplier, BeanDefinitionCustomizer... customizers) {\n        this.reader.registerBean(beanClass, beanName, supplier, customizers);\n    }<\/code><\/pre>\n<p>(4)\u6ce8\u89e3\u4f7f\u7528\u5728\u5c5e\u6027\u4e0a\u9762\uff0c\u5c5e\u6027\u503c\u53ef\u4ee5\u4e3a\u7a7a<\/p>\n<pre><code class=\"language-java\">@Nullable\n    private String name;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>3\u3001Spring5\u6846\u67b6\u6838\u5fc3\u5bb9\u5668\u652f\u6301@Nullable\u6ce8\u89e3 (1)@Nullable\u6ce8\u89e3\u53ef\u4ee5\u4f7f\u7528\u5728\u65b9\u6cd5\u4e0a\u9762\uff0c\u5c5e\u6027 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[125],"tags":[68],"class_list":["post-316","post","type-post","status-publish","format-standard","hentry","category-java-backend","tag-spring"],"_links":{"self":[{"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/posts\/316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=316"}],"version-history":[{"count":1,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/posts\/316\/revisions"}],"predecessor-version":[{"id":2139,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/posts\/316\/revisions\/2139"}],"wp:attachment":[{"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}