{"id":230803,"date":"2020-12-28T20:10:06","date_gmt":"2020-12-28T12:10:06","guid":{"rendered":"http:\/\/4563.org\/?p=230803"},"modified":"2020-12-28T20:10:06","modified_gmt":"2020-12-28T12:10:06","slug":"%e5%85%b3%e4%ba%8e-spring-%e9%a1%b9%e7%9b%ae%e5%90%af%e5%8a%a8%e6%97%b6%e5%88%9d%e5%a7%8b%e5%8c%96%e8%a1%a8%e7%bb%93%e6%9e%84%e7%9a%84%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=230803","title":{"rendered":"\u5173\u4e8e Spring \u9879\u76ee\u542f\u52a8\u65f6\u521d\u59cb\u5316\u8868\u7ed3\u6784\u7684\u95ee\u9898"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5173\u4e8e Spring \u9879\u76ee\u542f\u52a8\u65f6\u521d\u59cb\u5316\u8868\u7ed3\u6784\u7684\u95ee\u9898               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yestodayHadRain <\/span>  <span><i><\/i> 9<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        Spring \u53ef\u4ee5\u901a\u8fc7\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u6307\u5b9a\u4e00\u4e2a sql \u6587\u4ef6\uff0c\u9879\u76ee\u542f\u52a8\u7684\u65f6\u5019\u4f1a\u6267\u884c\u8fd9\u4e2a sql \u6587\u4ef6\uff0c\u5b8c\u6210\u521d\u59cb\u5316\u8868\u7ed3\u6784\u3002<\/p>\n<p>\u73b0\u5728\u6709\u4e00\u4e2a\u95ee\u9898\uff0c\u5c31\u662f\u73b0\u5728\u9879\u76ee\u4ee3\u7801\u6709\u8fc7\u6539\u52a8\uff0c\u6539\u4e86\u8868\u7ed3\u6784\u9700\u8981\u5728\u539f\u6765\u5df2\u5b58\u5728\u7684\u8868\u4e0a\u65b0\u589e\u51e0\u4e2a\u5b57\u6bb5\u3002\u9700\u8981 alter table \u4e0b\uff0c\u4f46\u662f\u4e0d\u80fd\u76f4\u63a5 alter table \u8981\u5148\u5224\u65ad\u5f53\u524d\u6570\u636e\u5e93\u8868\u91cc\u6709\u6ca1\u6709\u8fd9\u4e2a\u5b57\u6bb5\uff0c\u6ca1\u6709\u7684\u8bdd\u5728 alter table \u6dfb\u52a0\u5b57\u6bb5\u3002\u5c31\u5199\u4e86\u4e00\u4e2a\u5b58\u50a8\u8fc7\u7a0b\uff0c\u7136\u540e call \u8fd9\u4e2a\u5b58\u50a8\u8fc7\u7a0b\u3002<\/p>\n<p>\u53ef\u662f\u9879\u76ee\u542f\u52a8\u7684\u65f6\u5019\uff0c\u62a5\u4e86\u8bed\u6cd5\u9519\u8bef\u3002\u6211\u7528 navicat \u6267\u884c\u8fd9\u4e2a\u5b58\u50a8\u8fc7\u7a0b\u662f\u6ca1\u95ee\u9898\u7684\uff0c\u4f46\u662f\u653e\u5230 spring \u7684 Sql \u6587\u4ef6\u91cc\u5c31\u62a5\u8bed\u6cd5\u9519\u8bef\u3002\u662f spring \u521d\u59cb\u5316\u8868\u7ed3\u6784\u7684\u6587\u4ef6\u4e0d\u652f\u6301\u5b58\u50a8\u8fc7\u7a0b\u5417\uff1f\u5982\u679c\u4e0d\u652f\u6301\uff0c\u6211\u8fd9\u91cc\u8fd9\u4e2a\u95ee\u9898\u8981\u600e\u4e48\u89e3\u51b3\u5462\uff1f<\/p>\n<p>\u8dea\u8c22\u5404\u4f4d\u5927\u4f6c\u2026\u2026      <\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>12<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4590994\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lcorange <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             spring \u53ef\u4ee5\u6dfb\u52a0\u4e00\u4e2a\u53eb flyway \u7684\u7ec4\u4ef6\uff0c\u4f60\u53ef\u4ee5\u5199\u7248\u672c 1\uff0c2\uff0c3\uff0c4 \u7b49\u7248\u672c\u7684 sql\uff0c\u5b83\u4f1a\u5224\u65ad\u5f53\u524d\u670d\u52a1\u5668\u6267\u884c\u5230\u4e86\u54ea\u4e00\u4e2a\uff0c\u7136\u540e\u589e\u91cf\u66f4\u65b0                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4590995\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : yestodayHadRain <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @lcorange spring \u521d\u59cb\u5316\u8868\u7ed3\u6784\u7684 sql \u6587\u4ef6\u4e0d\u652f\u6301\u5199\u5b58\u50a8\u8fc7\u7a0b\u5417\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4590996\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lcorange <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5b58\u50a8\u8fc7\u7a0b\u6211\u6ca1\u6709\u8bd5\u8fc7\uff0c\u4e0d\u77e5\u9053\u600e\u4e48\u652f\u6301\u3002<\/p>\n<p>flyway \u6211\u7528\u4e86\u5f88\u4e45\uff0c\u8fd9\u4e2a\u7ec4\u4ef6\u4e0d\u9700\u8981\u5199\u5b58\u50a8\u8fc7\u7a0b\uff0c\u5b8c\u5168\u53ef\u4ee5\u6ee1\u8db3\u4f60\u7684\u9700\u6c42\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4590997\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : cheng6563 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             jdbc \u8981\u52a0\u4e2a\u53c2\u6570\u624d\u80fd\u6267\u884c\u591a\u884c SQL                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4590998\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : yestodayHadRain <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @cheng6563 \u4ec0\u4e48\u53c2\u6570?\u662f\u914d\u7f6e\u6587\u4ef6\u91cc\u7684\u53c2\u6570\u5417?                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4590999\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : cheng6563 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @yestodayHadRain \u52a0\u4e2a allowMultiQueries=true<br \/>\u4f8b<br \/>jdbc:mysql:\/\/127.0.0.1:3306\/junit?useUnicode=true&amp;characterEncoding=utf8&amp;allowMultiQueries=true                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4591000\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : yestodayHadRain <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @cheng6563 \u90a3 spring \u521d\u59cb\u5316\u8868\u7ed3\u6784\u7684 sql \u6587\u4ef6\u4e2d \u53ef\u4ee5\u653e\u5b58\u50a8\u8fc7\u7a0b\u5417?                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4591001\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : yestodayHadRain <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @cheng6563 \u52a0\u4e86\u8fd9\u4e2a\u53c2\u6570,\u542f\u52a8\u9879\u76ee\u8fd8\u662f\u5931\u8d25.\u4f1a\u4e0d\u4f1a\u662f\u4e0d\u652f\u6301\u6267\u884c\u5b58\u50a8\u8fc7\u7a0b?                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4591002\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : cheng6563 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @yestodayHadRain \u5e94\u8be5\u53ef\u4ee5\u7684\uff0c\u4f60\u628a\u62a5\u9519\u8d34\u51fa\u6765\u770b\u770b\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4591003\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : yestodayHadRain <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @cheng6563 Failed to execute SQL script statement #2 of class path resource [sql\/alter.sql]: DELIMITER$$ CREATE PROCEDURE ADD_COLUMN() BEGIN IF NOT EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = &#8216;test_case&#8217; AND table_schema = &#8216;case_manager&#8217; AND column_name = &#8216;biz_id&#8217;) THEN alter table test_case add column biz_id varchar(500) default &#8216;-1&#8217; not null comment &#8216;\u5173\u8054\u7684\u6587\u4ef6\u5939 id&#8217;; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#8216;DELIMITER$$ CREATE PROCEDURE ADD_COLUMN() BEGIN IF NOT EXISTS( SELECT * FROM INF&#8217; at line 1                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4591004\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : yestodayHadRain <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @cheng6563 \u62a5\u7684\u8bed\u6cd5\u9519\u8bef,\u4f46\u662f\u8fd9\u5b58\u50a8\u8fc7\u7a0b\u6211\u5728 Navicat \u91cc\u6267\u884c\u662f\u6ca1\u95ee\u9898\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4591005\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : yestodayHadRain <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @cheng6563 \u5927\u4f6c\u65b9\u4fbf\u52a0\u4e2a\u8054\u7cfb\u65b9\u5f0f\u5417?\u597d\u50cf\u6709\u70b9\u7709\u76ee\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5173\u4e8e Spring \u9879\u76ee\u542f\u52a8\u65f6\u521d\u59cb&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/230803"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=230803"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/230803\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=230803"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=230803"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=230803"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}