{"id":35073,"date":"2024-11-26T10:02:34","date_gmt":"2024-11-26T02:02:34","guid":{"rendered":"https:\/\/fwq.ai\/blog\/35073\/"},"modified":"2024-11-26T10:02:34","modified_gmt":"2024-11-26T02:02:34","slug":"springboot-2-2-x-%e4%b8%ad%e5%a6%82%e4%bd%95%e5%88%a4%e6%96%ad%e5%af%b9%e8%b1%a1%e4%b8%ba%e7%a9%ba%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/35073\/","title":{"rendered":"SpringBoot 2.2.x \u4e2d\u5982\u4f55\u5224\u65ad\u5bf9\u8c61\u4e3a\u7a7a\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173060155228080.jpg\" class=\"aligncenter\" title=\"SpringBoot 2.2.x \u4e2d\u5982\u4f55\u5224\u65ad\u5bf9\u8c61\u4e3a\u7a7a\uff1f\u63d2\u56fe\" alt=\"SpringBoot 2.2.x \u4e2d\u5982\u4f55\u5224\u65ad\u5bf9\u8c61\u4e3a\u7a7a\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>SpringBoot 2.2.x\uff1a\u5224\u65ad\u5bf9\u8c61\u4e3a\u7a7a\u7684\u56f0\u60d1<\/strong><\/p>\n<p>\u5728\u4f7f\u7528 SpringBoot 2.2.x \u65f6\uff0c\u60a8\u53ef\u80fd\u5728\u4f7f\u7528 JPA \u67e5\u8be2\u6570\u636e\u65f6\u9047\u5230\u4e00\u4e2a\u95ee\u9898\uff0cIdea \u7f16\u8f91\u5668\u63d0\u793a\uff1a&#8221;Cannot resolve symbol &#8216;null&#8217;\u3002&#8221;<\/p>\n<p><strong>\u95ee\u9898\uff1a\u5982\u4f55\u5224\u65ad\u5bf9\u8c61\u4e3a\u7a7a\uff1f<\/strong><\/p>\n<p>\u5f53\u60a8\u8c03\u7528\u4e86\u4e00\u4e2a\u5bf9\u8c61\u7684\u67d0\u4e2a\u65b9\u6cd5\uff0c\u4f46\u53c8\u60f3\u68c0\u67e5\u8be5\u5bf9\u8c61\u662f\u5426\u4e3a null \u65f6\uff0c\u5c31\u4f1a\u51fa\u73b0\u8fd9\u4e2a\u95ee\u9898\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u80fd\u5728\u8c03\u7528\u5bf9\u8c61\u7684 System.out.print() \u65b9\u6cd5\u65f6\u6dfb\u52a0\u4e86\u7a7a\u5224\u65ad\u3002<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6cd5<\/strong><\/p>\n<p>\u7cfb\u7edf\u5047\u8bbe\u60a8\u5728\u8c03\u7528\u65b9\u6cd5\u4e4b\u524d\u5df2\u68c0\u67e5\u8fc7\u5bf9\u8c61\u662f\u5426\u4e3a null\uff0c\u56e0\u6b64\u4e0d\u9700\u8981\u989d\u5916\u7684\u7a7a\u5224\u65ad\u3002\u56e0\u6b64\uff0c\u53ea\u9700\u5220\u9664\u4e0d\u5fc5\u8981\u7684\u7a7a\u5224\u65ad\uff0c\u5373\u53ef\u6d88\u9664\u63d0\u793a\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fSpringBoot 2.2.x \u4e2d\u5982\u4f55\u5224\u65ad\u5bf9\u8c61\u4e3a\u7a7a\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SpringBoot 2.2.x\uff1a\u5224\u65ad\u5bf9\u8c61\u4e3a\u7a7a\u7684\u56f0\u60d1 \u5728\u4f7f\u7528 SpringBoot 2.2.x \u65f6\uff0c\u60a8\u53ef\u80fd\u5728\u4f7f\u7528 JPA \u67e5\u8be2\u6570\u636e\u65f6\u9047\u5230\u4e00\u4e2a\u95ee\u9898\uff0cIdea \u7f16\u8f91\u5668\u63d0\u793a\uff1a&#8221;Cannot resolve symbol &#8216;null&#8217;\u3002&#8221; \u95ee\u9898\uff1a\u5982\u4f55\u5224\u65ad\u5bf9\u8c61\u4e3a\u7a7a\uff1f \u5f53\u60a8\u8c03\u7528\u4e86\u4e00\u4e2a\u5bf9\u8c61\u7684\u67d0\u4e2a\u65b9\u6cd5\uff0c\u4f46\u53c8\u60f3\u68c0\u67e5\u8be5\u5bf9\u8c61\u662f\u5426\u4e3a null \u65f6\uff0c\u5c31\u4f1a\u51fa\u73b0\u8fd9\u4e2a\u95ee\u9898\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u80fd\u5728\u8c03\u7528\u5bf9\u8c61\u7684 System.out.print() \u65b9\u6cd5\u65f6\u6dfb\u52a0\u4e86\u7a7a\u5224\u65ad\u3002 \u89e3\u51b3\u65b9\u6cd5 \u7cfb\u7edf\u5047\u8bbe\u60a8\u5728\u8c03\u7528\u65b9\u6cd5\u4e4b\u524d\u5df2\u68c0\u67e5\u8fc7\u5bf9\u8c61\u662f\u5426\u4e3a null\uff0c\u56e0\u6b64\u4e0d\u9700\u8981\u989d\u5916\u7684\u7a7a\u5224\u65ad\u3002\u56e0\u6b64\uff0c\u53ea\u9700\u5220\u9664\u4e0d\u5fc5\u8981\u7684\u7a7a\u5224\u65ad\uff0c\u5373\u53ef\u6d88\u9664\u63d0\u793a\u3002 \u4ee5\u4e0a\u5c31\u662fSpringBoot 2.2.x \u4e2d\u5982\u4f55\u5224\u65ad\u5bf9\u8c61\u4e3a\u7a7a\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-35073","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/35073","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=35073"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/35073\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=35073"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=35073"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=35073"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}