{"id":36507,"date":"2024-11-26T14:18:28","date_gmt":"2024-11-26T06:18:28","guid":{"rendered":"https:\/\/fwq.ai\/blog\/36507\/"},"modified":"2024-11-26T14:18:28","modified_gmt":"2024-11-26T06:18:28","slug":"springboot-%e4%bd%bf%e7%94%a8-mybatis-plus-%e6%8a%a5%e9%94%99-java-lang-nosuchmethoderror-%e5%a6%82%e4%bd%95%e8%a7%a3%e5%86%b3%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/36507\/","title":{"rendered":"SpringBoot \u4f7f\u7528 Mybatis-plus \u62a5\u9519 java.lang.NoSuchMethodError \u5982\u4f55\u89e3\u51b3\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173124451888069.jpg\" class=\"aligncenter\" title=\"SpringBoot \u4f7f\u7528 Mybatis-plus \u62a5\u9519 java.lang.NoSuchMethodError \u5982\u4f55\u89e3\u51b3\uff1f\u63d2\u56fe\" alt=\"SpringBoot \u4f7f\u7528 Mybatis-plus \u62a5\u9519 java.lang.NoSuchMethodError \u5982\u4f55\u89e3\u51b3\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>SpringBoot \u4f7f\u7528 Mybatis-plus \u62a5\u9519 java.lang.NoSuchMethodError<\/strong><\/p>\n<p>\u5728\u914d\u7f6e Mybatis-plus \u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230 java.lang.NoSuchMethodError\uff0c\u8868\u660e\u627e\u4e0d\u5230\u5bf9\u5e94\u7684\u65b9\u6cd5\uff0c\u5373\u4f7f\u5df2\u7ecf\u914d\u7f6e\u597d\u4e86 Mapper \u63a5\u53e3\u548c XML \u6587\u4ef6\u3002<\/p>\n<p><strong>\u53ef\u80fd\u7684\u539f\u56e0\uff1a<\/strong><\/p>\n<p>XML \u6587\u4ef6\u6ca1\u6709\u88ab\u7f16\u8bd1\u5230\u6e90\u7801\u76ee\u5f55\u4e2d\u3002<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6cd5\uff1a<\/strong><\/p>\n<p>\u68c0\u67e5 XML \u6587\u4ef6\u662f\u5426\u6b63\u786e\u914d\u7f6e\uff0c\u5e76\u786e\u4fdd\u5b83\u5df2\u88ab\u7f16\u8bd1\u5230\u6e90\u7801\u76ee\u5f55\uff1a<\/p>\n<ul>\n<li>\u5728 IntelliJ IDEA \u4e2d\uff0c\u5728 XML \u6587\u4ef6\u4e0a\u53f3\u952e\u70b9\u51fb\uff0c\u9009\u62e9 &#8220;Build Module&#8221;\u3002<\/li>\n<li>\u5728 Maven \u4e2d\uff0c\u8fd0\u884c &#8220;mvn clean install&#8221; \u547d\u4ee4\u3002<\/li>\n<\/ul>\n<p>\u5982\u679c\u95ee\u9898\u4ecd\u7136\u5b58\u5728\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4ee5\u4e0b\u64cd\u4f5c\uff1a<\/p>\n<ul>\n<li>\u68c0\u67e5 Mapper \u63a5\u53e3\u662f\u5426\u6b63\u786e\u5b9a\u4e49\uff0c\u65b9\u6cd5\u540d\u548c\u53c2\u6570\u7c7b\u578b\u662f\u5426\u4e0e XML \u6587\u4ef6\u5339\u914d\u3002<\/li>\n<li>\u68c0\u67e5 Mybatis-plus \u7248\u672c\u662f\u5426\u4e0e\u5e95\u5c42\u6570\u636e\u5e93\u517c\u5bb9\u3002<\/li>\n<li>\u68c0\u67e5 mybatis-spring-boot-starter \u7684\u4f9d\u8d56\u5305\u662f\u5426\u5df2\u6dfb\u52a0\u5230 pom.xml \u6587\u4ef6\u4e2d\u3002<\/li>\n<li>\u91cd\u542f\u5e94\u7528\u7a0b\u5e8f\u3002<\/li>\n<\/ul>\n<p>\u901a\u8fc7\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u901a\u5e38\u53ef\u4ee5\u89e3\u51b3 &#8220;java.lang.NoSuchMethodError&#8221; \u62a5\u9519\u5e76\u6b63\u5e38\u4f7f\u7528 Mybatis-plus\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fSpringBoot \u4f7f\u7528 Mybatis-plus \u62a5\u9519 java.lang.NoSuchMethodError \u5982\u4f55\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>SpringBoot \u4f7f\u7528 Mybatis-plus \u62a5\u9519 java.lang.NoSuchMethodError \u5728\u914d\u7f6e Mybatis-plus \u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230 java.lang.NoSuchMethodError\uff0c\u8868\u660e\u627e\u4e0d\u5230\u5bf9\u5e94\u7684\u65b9\u6cd5\uff0c\u5373\u4f7f\u5df2\u7ecf\u914d\u7f6e\u597d\u4e86 Mapper \u63a5\u53e3\u548c XML \u6587\u4ef6\u3002 \u53ef\u80fd\u7684\u539f\u56e0\uff1a XML \u6587\u4ef6\u6ca1\u6709\u88ab\u7f16\u8bd1\u5230\u6e90\u7801\u76ee\u5f55\u4e2d\u3002 \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u89e3\u51b3\u65b9\u6cd5\uff1a \u68c0\u67e5 XML \u6587\u4ef6\u662f\u5426\u6b63\u786e\u914d\u7f6e\uff0c\u5e76\u786e\u4fdd\u5b83\u5df2\u88ab\u7f16\u8bd1\u5230\u6e90\u7801\u76ee\u5f55\uff1a \u5728 IntelliJ IDEA \u4e2d\uff0c\u5728 XML \u6587\u4ef6\u4e0a\u53f3\u952e\u70b9\u51fb\uff0c\u9009\u62e9 &#8220;Build Module&#8221;\u3002 \u5728 Maven \u4e2d\uff0c\u8fd0\u884c &#8220;mvn clean install&#8221; \u547d\u4ee4\u3002 \u5982\u679c\u95ee\u9898\u4ecd\u7136\u5b58\u5728\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4ee5\u4e0b\u64cd\u4f5c\uff1a \u68c0\u67e5 Mapper \u63a5\u53e3\u662f\u5426\u6b63\u786e\u5b9a\u4e49\uff0c\u65b9\u6cd5\u540d\u548c\u53c2\u6570\u7c7b\u578b\u662f\u5426\u4e0e XML \u6587\u4ef6\u5339\u914d\u3002 \u68c0\u67e5 Mybatis-plus \u7248\u672c\u662f\u5426\u4e0e\u5e95\u5c42\u6570\u636e\u5e93\u517c\u5bb9\u3002 \u68c0\u67e5 mybatis-spring-boot-starter \u7684\u4f9d\u8d56\u5305\u662f\u5426\u5df2\u6dfb\u52a0\u5230 pom.xml \u6587\u4ef6\u4e2d\u3002 \u91cd\u542f\u5e94\u7528\u7a0b\u5e8f\u3002 \u901a\u8fc7\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u901a\u5e38\u53ef\u4ee5\u89e3\u51b3 &#8220;java.lang.NoSuchMethodError&#8221; \u62a5\u9519\u5e76\u6b63\u5e38\u4f7f\u7528 Mybatis-plus\u3002 [&hellip;]<\/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-36507","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/36507","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=36507"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/36507\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=36507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=36507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=36507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}