{"id":423884,"date":"2021-04-03T19:59:13","date_gmt":"2021-04-03T11:59:13","guid":{"rendered":"http:\/\/4563.org\/?p=423884"},"modified":"2021-04-03T19:59:13","modified_gmt":"2021-04-03T11:59:13","slug":"%e8%af%b7%e6%95%99%e4%b8%80%e4%b8%aa-java-%e9%9d%a2%e8%af%95%e9%a2%98","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=423884","title":{"rendered":"\u8bf7\u6559\u4e00\u4e2a Java \u9762\u8bd5\u9898"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u8bf7\u6559\u4e00\u4e2a Java \u9762\u8bd5\u9898               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : qwer666df <\/span>  <span><i><\/i> 0<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>Java \u4f7f\u7528 mybatis \u80fd\u5426\u5b8c\u6210\u81ea\u5b9a\u4e49\u7684 insert \u67e5\u8be2<\/p>\n<p>A \u8868\u662f\u914d\u7f6e\u8868 \u91cc\u9762\u5b58\u7684\u662f\u6570\u636e\u5e93\u5b57\u6bb5\u540d <\/p>\n<p>\u7136\u540e\u524d\u7aef\u6709\u4e00\u4e2a &lt;\u5217\u8868&gt; <\/p>\n<p>\u91cc\u9762\u5b57\u6bb5\u540d\u662f\u4ece A \u8868\u52a8\u6001\u8bfb\u7684, \u8fd9\u91cc\u6709\u5565\u524d\u7aef\u5c31\u663e\u793a\u5565 <\/p>\n<p>\u7136\u540e\u95ee \u6570\u636e\u8868\u6570\u636e\u5e93\u5e94\u8be5\u600e\u4e48\u8bbe\u8ba1 \u6216\u8005 \u6709\u4ec0\u4e48\u5176\u4ed6\u601d\u8def <\/p>\n<p>\u8fd9\u4e2a,\u5728 php,go \u91cc\u9762\u5f88\u597d\u5b9e\u73b0, \u51ed\u501f\u597d\u8bed\u53e5\u76f4\u63a5\u53d1\u9001\u7ed9 db query \u5c31\u597d\u4e86.<\/p>\n<p>\u4f46\u662f, Java \u91cc\u9762\u597d\u50cf\u662f\u8981 xml \u6620\u5c04\u5427? \u6ca1\u6cd5\u505a\u5230\u52a8\u6001<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>11<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5628463\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : huyujievip <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             MyBatis Plus \u53ef\u4ee5\u5b9e\u73b0\u7b80\u5355\u7684\u67e5\u8be2                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5628464\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : huyujievip <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e5f\u9700\u8981\u521b\u5efa xml\uff0c\u4f46\u662f\u4e0d\u9700\u8981\u7f16\u5199\u67e5\u8be2\u8bed\u53e5\uff0c\u4f7f\u7528 MyBatis Plus \u7684 queryMappr \u5bf9\u8c61\u53ef\u4ee5\u7ec4\u7ec7\u67e5\u8be2\u6216\u8005\u63d2\u5165\u6761\u4ef6                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5628465\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : assiadamo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6ca1\u5fc5\u8981\u7279\u522b\u8bbe\u8ba1\u5427\uff0c\u8868\u9700\u8981\u5b58\u4ec0\u4e48\u6570\u636e\u5c31\u662f\u4ec0\u4e48\u6570\u636e\uff0c\u7136\u540e jdbc \u6709\u63a5\u53e3\u53ef\u4ee5\u83b7\u53d6\u8868\u548c\u5e93\u7684\u5143\u6570\u636e\uff0c\u5217\u540d\u548c\u7c7b\u578b\u5168\u90fd\u80fd\u83b7\u53d6\u51fa\u6765\uff0c\u65e2\u7136 jdbc \u80fd\uff0c\u5728 jdbc \u4e0a\u7684 mybatis \u80af\u5b9a\u4e5f\u80fd<br \/>\u4e4b\u540e\u5c31\u53ef\u4ee5\u7ec4\u88c5\u6570\u636e\uff0c\u4e00\u5957\u524d\u7aef\u6a21\u677f\u5c31\u53ef\u4ee5\u663e\u793a N \u4e2a\u8868\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5628466\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Dimomo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             mybatis annotation                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5628467\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : RuzZ <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5982\u679c\u662f\u8981\u7b80\u5355\u7684\u62fc\u63a5 sql\uff0c\u76f4\u63a5\u7528 jdbcTemplate \u5c31\u53ef\u4ee5\u4e86\uff1b\u5982\u679c\u662f\u60f3\u52a8\u6001\u6620\u5c04 bean \u5230\u6570\u636e\u5e93\uff0c\u4e0d\u5199 xml \u6620\u5c04\u8fd9\u79cd\u7684\uff0cjooq \u3001mybatis dynamic sql \u3001\u751a\u81f3 mybatis-plus \u90fd\u53ef\u4ee5\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5628468\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : RuzZ <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @RuzZ \u770b\u4f60\u7684\u63cf\u8ff0\uff0c\u5e94\u8be5\u662f bean \u5230\u6570\u636e\u5e93\u7684\u6620\u5c04\u662f\u786e\u5b9a\u7684\uff0c\u4f46\u662f select \u7684\u5b57\u6bb5\u548c where \u6761\u4ef6\u662f\u52a8\u6001\u53d8\u5316\u7684\uff0c\u8fd9\u79cd mybatis dynamic sql \u548c jooq \u5e94\u8be5\u53ef\u4ee5\u6ee1\u8db3\u4f60\u7684\u8981\u6c42\uff0c\u4e0d\u8fc7\u8fd9\u4e2a mybatis dynamic sql \u793e\u533a\u8d44\u6599\u4e0d\u662f\u5f88\u4e30\u5bcc\uff0cjooq \u76f8\u5bf9\u4e30\u5bcc\u4e00\u4e9b\uff0c\u4f60\u53ef\u4ee5\u81ea\u5df1\u8c03\u7814\u770b\u770b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5628469\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : rancc <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5b9e\u73b0 mybatis-plugin\uff0c\u6839\u636e\u914d\u7f6e\u5185\u5bb9\u5728 Interceptor \u91cc\u62fc\u63a5\u8981\u6267\u884c\u7684 sql                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5628470\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : whitelee8080 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             mybatis \u53ef\u4ee5\u52a8\u6001\u67e5\u8be2<br \/>&#8220;`xml<br \/> &lt;select id=&#8221;dyQuery&#8221; resultType=&#8221;java.util.Map&#8221; parameterType=&#8221;java.lang.String&#8221; statementType=&#8221;STATEMENT&#8221;&gt;<br \/> select<br \/> ${field}<br \/> from<br \/> ${tableName}<br \/> &lt;\/select&gt;<br \/>&#8220;`<br \/>\u5c06 A \u8868\u4fdd\u5b58\u7684\u5b57\u6bb5\u540d(\u62fc\u63a5\u597d\u7684)\uff0c\u6570\u636e\u5e93\u540d\u4f20\u5982\u5c31\u884c\uff0c\u4f46\u662f\u6709 sql \u6ce8\u5165\u98ce\u9669\u3002<\/p>\n<p>\u4e0d\u77e5\u9053\u662f\u5426\u7b26\u5408\u9898\u4e3b\u6240\u8bf4\u7684\u95ee\u9898\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5628471\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : arthas2234 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u66b4\u9732\u8868\u7ed3\u6784\u7ed9\u524d\u7aef\uff0c\u5e76\u4e0d\u662f\u4e00\u4e2a\u597d\u7684\u8bbe\u8ba1                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5628472\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : beichenhpy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             $ \u5c31\u53ef\u4ee5\u4e86\u5427\uff0c\u6709\u5565\u4e0d\u80fd\u52a8\u6001\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5628473\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xiaoxinshiwo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             json \u683c\u5f0f\u5b58\u50a8\u4e5f\u53ef                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf7\u6559\u4e00\u4e2a Java \u9762\u8bd5\u9898 \u8cc7\u6df1\u5927&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\/423884"}],"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=423884"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/423884\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=423884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=423884"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=423884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}