{"id":36253,"date":"2024-11-26T12:45:36","date_gmt":"2024-11-26T04:45:36","guid":{"rendered":"https:\/\/fwq.ai\/blog\/36253\/"},"modified":"2024-11-26T12:45:36","modified_gmt":"2024-11-26T04:45:36","slug":"springboot-%e4%bd%bf%e7%94%a8-mybatis-plus-%e9%81%87%e5%88%b0-nosuchmethoderror-%e9%94%99%e8%af%af%ef%bc%8c%e5%a6%82%e4%bd%95%e6%8e%92%e6%9f%a5%e8%a7%a3%e5%86%b3%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/36253\/","title":{"rendered":"SpringBoot \u4f7f\u7528 Mybatis-Plus \u9047\u5230 NoSuchMethodError \u9519\u8bef\uff0c\u5982\u4f55\u6392\u67e5\u89e3\u51b3\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173104222673505.jpg\" class=\"aligncenter\" title=\"SpringBoot \u4f7f\u7528 Mybatis-Plus \u9047\u5230 NoSuchMethodError \u9519\u8bef\uff0c\u5982\u4f55\u6392\u67e5\u89e3\u51b3\uff1f\u63d2\u56fe\" alt=\"SpringBoot \u4f7f\u7528 Mybatis-Plus \u9047\u5230 NoSuchMethodError \u9519\u8bef\uff0c\u5982\u4f55\u6392\u67e5\u89e3\u51b3\uff1f\u63d2\u56fe\" \/><\/p>\n<p>\u5728 SpringBoot \u4f7f\u7528 Mybatis-Plus \u65f6\u9047\u5230 java.lang.NoSuchMethodError \u9519\u8bef\uff0c\u901a\u5e38\u610f\u5473\u7740\u627e\u4e0d\u5230\u6307\u5b9a\u65b9\u6cd5\u3002\u6839\u636e\u4f60\u63d0\u4f9b\u7684\u4ee3\u7801\u548c\u63cf\u8ff0\uff0c\u53ef\u4ee5\u4ece\u51e0\u4e2a\u65b9\u9762\u8fdb\u884c\u6392\u67e5\uff1a<\/p>\n<p>xml \u6587\u4ef6\u662f\u5426\u88ab\u7f16\u8bd1\u5230\u6e90\u7801\u76ee\u5f55\u4e2d\uff1fMybatis-Plus \u9700\u8981\u6620\u5c04\u7684 xml \u6587\u4ef6\u88ab\u7f16\u8bd1\u5230\u6e90\u7801\u76ee\u5f55\uff0c\u4ee5\u4fbf\u52a0\u8f7d\u5668\u80fd\u591f\u627e\u5230\u5b83\u3002\u786e\u4fdd xml \u6587\u4ef6\u4e0e mapper \u7c7b\u5904\u4e8e\u540c\u4e00\u5305\u4e0b\u6216\u6307\u5b9a\u6b63\u786e\u7684\u8def\u5f84\u3002<\/p>\n<p>\u68c0\u67e5 Mapper \u63a5\u53e3\u7684\u5305\u540d\u662f\u5426\u4e0e mapper.xml \u6587\u4ef6\u4e00\u81f4\u3002\u4e24\u8005\u5fc5\u987b\u4f7f\u7528\u76f8\u540c\u7684\u5305\u540d\u624d\u80fd\u6b63\u786e\u5173\u8054\u3002<\/p>\n<p>\u68c0\u67e5 Mapper \u63a5\u53e3\u7684\u65b9\u6cd5\u7b7e\u540d\u662f\u5426\u4e0e mapper.xml \u6587\u4ef6\u4e2d\u5b9a\u4e49\u7684\u65b9\u6cd5\u4e00\u81f4\uff0c\u5305\u62ec\u65b9\u6cd5\u540d\u3001\u53c2\u6570\u548c\u8fd4\u56de\u7c7b\u578b\u3002<\/p>\n<p>\u5728 pom.xml \u4e2d\u68c0\u67e5 Mybatis-Plus \u7684\u4f9d\u8d56\u7248\u672c\u662f\u5426\u6b63\u786e\u3002\u5efa\u8bae\u4f7f\u7528\u6700\u65b0\u7248\u672c\uff0c\u4ee5\u83b7\u5f97\u6700\u4f73\u517c\u5bb9\u6027\u548c\u529f\u80fd\u3002<\/p>\n<p>\u5982\u679c\u4ecd\u7136\u65e0\u6cd5\u89e3\u51b3\u95ee\u9898\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4ee5\u4e0b\u64cd\u4f5c\uff1a<\/p>\n<ol>\n<li>\u6e05\u9664\u9879\u76ee\u5e76\u91cd\u65b0\u6784\u5efa\u3002<\/li>\n<li>\u91cd\u65b0\u542f\u52a8 SpringBoot \u5e94\u7528\u7a0b\u5e8f\u3002<\/li>\n<li>\u68c0\u67e5\u65e5\u5fd7\u6587\u4ef6\u4ee5\u83b7\u53d6\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\u3002<\/li>\n<\/ol>\n<p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u901a\u5e38\u53ef\u4ee5\u89e3\u51b3 java.lang.NoSuchMethodError \u9519\u8bef\uff0c\u4ee5\u4fbf Mybatis-Plus \u80fd\u591f\u6b63\u786e\u5de5\u4f5c\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fSpringBoot \u4f7f\u7528 Mybatis-Plus \u9047\u5230 NoSuchMethodError \u9519\u8bef\uff0c\u5982\u4f55\u6392\u67e5\u89e3\u51b3\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>\u5728 SpringBoot \u4f7f\u7528 Mybatis-Plus \u65f6\u9047\u5230 java.lang.NoSuchMethodError \u9519\u8bef\uff0c\u901a\u5e38\u610f\u5473\u7740\u627e\u4e0d\u5230\u6307\u5b9a\u65b9\u6cd5\u3002\u6839\u636e\u4f60\u63d0\u4f9b\u7684\u4ee3\u7801\u548c\u63cf\u8ff0\uff0c\u53ef\u4ee5\u4ece\u51e0\u4e2a\u65b9\u9762\u8fdb\u884c\u6392\u67e5\uff1a xml \u6587\u4ef6\u662f\u5426\u88ab\u7f16\u8bd1\u5230\u6e90\u7801\u76ee\u5f55\u4e2d\uff1fMybatis-Plus \u9700\u8981\u6620\u5c04\u7684 xml \u6587\u4ef6\u88ab\u7f16\u8bd1\u5230\u6e90\u7801\u76ee\u5f55\uff0c\u4ee5\u4fbf\u52a0\u8f7d\u5668\u80fd\u591f\u627e\u5230\u5b83\u3002\u786e\u4fdd xml \u6587\u4ef6\u4e0e mapper \u7c7b\u5904\u4e8e\u540c\u4e00\u5305\u4e0b\u6216\u6307\u5b9a\u6b63\u786e\u7684\u8def\u5f84\u3002 \u68c0\u67e5 Mapper \u63a5\u53e3\u7684\u5305\u540d\u662f\u5426\u4e0e mapper.xml \u6587\u4ef6\u4e00\u81f4\u3002\u4e24\u8005\u5fc5\u987b\u4f7f\u7528\u76f8\u540c\u7684\u5305\u540d\u624d\u80fd\u6b63\u786e\u5173\u8054\u3002 \u68c0\u67e5 Mapper \u63a5\u53e3\u7684\u65b9\u6cd5\u7b7e\u540d\u662f\u5426\u4e0e mapper.xml \u6587\u4ef6\u4e2d\u5b9a\u4e49\u7684\u65b9\u6cd5\u4e00\u81f4\uff0c\u5305\u62ec\u65b9\u6cd5\u540d\u3001\u53c2\u6570\u548c\u8fd4\u56de\u7c7b\u578b\u3002 \u5728 pom.xml \u4e2d\u68c0\u67e5 Mybatis-Plus \u7684\u4f9d\u8d56\u7248\u672c\u662f\u5426\u6b63\u786e\u3002\u5efa\u8bae\u4f7f\u7528\u6700\u65b0\u7248\u672c\uff0c\u4ee5\u83b7\u5f97\u6700\u4f73\u517c\u5bb9\u6027\u548c\u529f\u80fd\u3002 \u5982\u679c\u4ecd\u7136\u65e0\u6cd5\u89e3\u51b3\u95ee\u9898\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4ee5\u4e0b\u64cd\u4f5c\uff1a \u6e05\u9664\u9879\u76ee\u5e76\u91cd\u65b0\u6784\u5efa\u3002 \u91cd\u65b0\u542f\u52a8 SpringBoot \u5e94\u7528\u7a0b\u5e8f\u3002 \u68c0\u67e5\u65e5\u5fd7\u6587\u4ef6\u4ee5\u83b7\u53d6\u66f4\u591a\u8be6\u7ec6\u4fe1\u606f\u3002 \u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u901a\u5e38\u53ef\u4ee5\u89e3\u51b3 java.lang.NoSuchMethodError \u9519\u8bef\uff0c\u4ee5\u4fbf Mybatis-Plus \u80fd\u591f\u6b63\u786e\u5de5\u4f5c\u3002 \u4ee5\u4e0a\u5c31\u662fSpringBoot \u4f7f\u7528 Mybatis-Plus \u9047\u5230 NoSuchMethodError \u9519\u8bef\uff0c\u5982\u4f55\u6392\u67e5\u89e3\u51b3\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-36253","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/36253","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=36253"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/36253\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=36253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=36253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=36253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}