{"id":6,"date":"2024-07-06T17:19:43","date_gmt":"2024-07-06T09:19:43","guid":{"rendered":"http:\/\/note.ui11.cc\/?p=6"},"modified":"2024-07-06T17:19:45","modified_gmt":"2024-07-06T09:19:45","slug":"%e4%bb%80%e4%b9%88%e6%98%afmybatis","status":"publish","type":"post","link":"https:\/\/note.ui11.cc\/index.php\/2024\/07\/06\/%e4%bb%80%e4%b9%88%e6%98%afmybatis\/","title":{"rendered":"\u4ec0\u4e48\u662fMybatis"},"content":{"rendered":"\n<p>Mybatis\u662f\u4e00\u6b3e\u6301\u4e45\u5c42\u6846\u67b6\uff0c\u7528\u4e8e\u7b80\u5316JDBC\u7684\u5f00\u53d1<\/p>\n\n\n\n<p class=\"has-vivid-cyan-blue-color has-text-color has-link-color wp-elements-36c983f9c7b0100af2d57a9d5968613b\">\u6301\u4e45\u5c42\uff1a\u8d1f\u8d23\u5c06\u6570\u636e\u4fdd\u5b58\u5230\u6570\u636e\u5e93\u7684\u90a3\u4e00\u5c42\u4ee3\u7801<\/p>\n\n\n\n<p>JavaEE\u4e09\u5c42\u67b6\u6784\uff1a<\/p>\n\n\n\n<p>Java EE\uff08Java Platform, Enterprise Edition\uff09\u4e09\u5c42\u67b6\u6784\u662f\u4e00\u79cd\u5e38\u89c1\u7684\u8f6f\u4ef6\u67b6\u6784\u6a21\u5f0f\uff0c\u7528\u4e8e\u7ec4\u7ec7\u548c\u5206\u79bb\u5e94\u7528\u7a0b\u5e8f\u7684\u4e0d\u540c\u90e8\u5206\uff0c\u4ee5\u63d0\u9ad8\u53ef\u7ef4\u62a4\u6027\u548c\u53ef\u6269\u5c55\u6027\u3002\u8fd9\u79cd\u67b6\u6784\u6a21\u5f0f\u5c06\u5e94\u7528\u7a0b\u5e8f\u5206\u4e3a\u4e09\u4e2a\u4e3b\u8981\u5c42\u6b21\uff1a<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u8868\u73b0\u5c42\uff08Presentation Layer\uff09<\/h3>\n\n\n\n<p>\u8868\u73b0\u5c42\uff0c\u4e5f\u79f0\u4e3a\u7528\u6237\u754c\u9762\u5c42\u6216\u524d\u7aef\u5c42\uff0c\u662f\u7528\u6237\u4e0e\u5e94\u7528\u7a0b\u5e8f\u4ea4\u4e92\u7684\u754c\u9762\u3002\u5b83\u8d1f\u8d23\u63a5\u6536\u7528\u6237\u7684\u8f93\u5165\u5e76\u5c55\u793a\u5e94\u7528\u7a0b\u5e8f\u7684\u8f93\u51fa\u3002\u5728 Java EE \u4e2d\uff0c\u8868\u73b0\u5c42\u901a\u5e38\u7531\u4ee5\u4e0b\u6280\u672f\u5b9e\u73b0\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Servlets<\/strong>\uff1a\u7528\u4e8e\u5904\u7406\u5ba2\u6237\u7aef\u8bf7\u6c42\u5e76\u751f\u6210\u54cd\u5e94\u7684 Java \u7c7b\u3002<\/li>\n\n\n\n<li><strong>JavaServer Pages (JSP)<\/strong>\uff1a\u4e00\u79cd\u7528\u4e8e\u521b\u5efa\u52a8\u6001\u7f51\u9875\u7684\u6280\u672f\uff0c\u5141\u8bb8\u5728 HTML \u9875\u9762\u4e2d\u5d4c\u5165 Java \u4ee3\u7801\u3002<\/li>\n\n\n\n<li><strong>JavaServer Faces (JSF)<\/strong>\uff1a\u4e00\u4e2a\u7528\u4e8e\u6784\u5efa\u7ec4\u4ef6\u5316\u7528\u6237\u754c\u9762\u7684\u6846\u67b6\u3002<\/li>\n\n\n\n<li><strong>Web Services<\/strong>\uff1a\u5141\u8bb8\u5e94\u7528\u7a0b\u5e8f\u901a\u8fc7\u7f51\u7edc\u8fdb\u884c\u901a\u4fe1\u7684\u63a5\u53e3\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u4e1a\u52a1\u903b\u8f91\u5c42\uff08Business Logic Layer\uff09\uff08\u4e1a\u52a1\u5c42\uff09<\/h3>\n\n\n\n<p>\u4e1a\u52a1\u903b\u8f91\u5c42\uff0c\u4e5f\u79f0\u4e3a\u670d\u52a1\u5c42\u6216\u4e2d\u95f4\u5c42\uff0c\u5305\u542b\u4e86\u5e94\u7528\u7a0b\u5e8f\u7684\u6838\u5fc3\u4e1a\u52a1\u89c4\u5219\u548c\u903b\u8f91\u3002\u5b83\u8d1f\u8d23\u5904\u7406\u6765\u81ea\u8868\u73b0\u5c42\u7684\u8bf7\u6c42\uff0c\u6267\u884c\u4e1a\u52a1\u64cd\u4f5c\uff0c\u5e76\u5c06\u7ed3\u679c\u8fd4\u56de\u7ed9\u8868\u73b0\u5c42\u3002\u5728 Java EE \u4e2d\uff0c\u4e1a\u52a1\u903b\u8f91\u5c42\u901a\u5e38\u7531\u4ee5\u4e0b\u6280\u672f\u5b9e\u73b0\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Enterprise JavaBeans (EJB)<\/strong>\uff1a\u4e00\u79cd\u7528\u4e8e\u6784\u5efa\u53ef\u6269\u5c55\u548c\u5b89\u5168\u7684\u4f01\u4e1a\u7ea7\u5e94\u7528\u7a0b\u5e8f\u7684\u7ec4\u4ef6\u6a21\u578b\u3002<\/li>\n\n\n\n<li><strong>Java Persistence API (JPA)<\/strong>\uff1a\u7528\u4e8e\u7ba1\u7406\u5173\u7cfb\u6570\u636e\u5e93\u4e2d\u6570\u636e\u7684\u6301\u4e45\u5316\u3002<\/li>\n\n\n\n<li><strong>Java Transaction API (JTA)<\/strong>\uff1a\u7528\u4e8e\u7ba1\u7406\u4e8b\u52a1\u7684 API\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u6570\u636e\u8bbf\u95ee\u5c42\uff08Data Access Layer\uff09\uff08\u6301\u4e45\u5c42\uff09<\/h3>\n\n\n\n<p>\u6570\u636e\u8bbf\u95ee\u5c42\uff0c\u4e5f\u79f0\u4e3a\u6301\u4e45\u5c42\uff0c\u8d1f\u8d23\u4e0e\u6570\u636e\u5b58\u50a8\u8fdb\u884c\u4ea4\u4e92\uff0c\u5305\u62ec\u6570\u636e\u5e93\u3001\u6587\u4ef6\u7cfb\u7edf\u6216\u5176\u4ed6\u6570\u636e\u6e90\u3002\u5b83\u63d0\u4f9b\u4e86\u6570\u636e\u7684\u5b58\u53d6\u548c\u7ba1\u7406\u529f\u80fd\u3002\u5728 Java EE \u4e2d\uff0c\u6570\u636e\u8bbf\u95ee\u5c42\u901a\u5e38\u7531\u4ee5\u4e0b\u6280\u672f\u5b9e\u73b0\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Java Database Connectivity (JDBC)<\/strong>\uff1a\u4e00\u79cd\u7528\u4e8e\u8fde\u63a5\u548c\u64cd\u4f5c\u6570\u636e\u5e93\u7684 API\u3002<\/li>\n\n\n\n<li><strong>JPA<\/strong>\uff1a\u9664\u4e86\u7528\u4e8e\u4e1a\u52a1\u903b\u8f91\u5c42\u5916\uff0cJPA \u4e5f\u5e38\u7528\u4e8e\u6570\u636e\u8bbf\u95ee\u5c42\uff0c\u4ee5\u5b9e\u73b0\u5bf9\u8c61\u5173\u7cfb\u6620\u5c04\uff08ORM\uff09\u3002<\/li>\n\n\n\n<li><strong>Java Message Service (JMS)<\/strong>\uff1a\u7528\u4e8e\u6784\u5efa\u6d88\u606f\u9a71\u52a8\u7684\u5e94\u7528\u7a0b\u5e8f\u7684 API\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u603b\u7ed3<\/h3>\n\n\n\n<p>Java EE \u4e09\u5c42\u67b6\u6784\u901a\u8fc7\u5206\u79bb\u5e94\u7528\u7a0b\u5e8f\u7684\u4e0d\u540c\u529f\u80fd\uff0c\u4f7f\u5f97\u6bcf\u4e2a\u5c42\u6b21\u53ef\u4ee5\u72ec\u7acb\u5f00\u53d1\u548c\u7ef4\u62a4\uff0c\u4ece\u800c\u63d0\u9ad8\u4e86\u5e94\u7528\u7a0b\u5e8f\u7684\u53ef\u7ef4\u62a4\u6027\u548c\u53ef\u6269\u5c55\u6027\u3002\u8fd9\u79cd\u67b6\u6784\u6a21\u5f0f\u4e5f\u652f\u6301\u4e86\u6a21\u5757\u5316\u8bbe\u8ba1\uff0c\u4f7f\u5f97\u5404\u4e2a\u5c42\u6b21\u53ef\u4ee5\u72ec\u7acb\u5347\u7ea7\u548c\u66ff\u6362\uff0c\u800c\u4e0d\u5f71\u54cd\u5176\u4ed6\u5c42\u6b21\u3002\u5728\u73b0\u4ee3 Java EE \u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u8fd9\u79cd\u67b6\u6784\u6a21\u5f0f\u4ecd\u7136\u662f\u6784\u5efa\u4f01\u4e1a\u7ea7\u5e94\u7528\u7a0b\u5e8f\u7684\u4e3b\u6d41\u65b9\u6cd5\u4e4b\u4e00\u3002<\/p>\n\n\n\n<p><strong>\u6846\u67b6\uff1a<em>\u6846\u67b6\u5c31\u662f\u4e00\u4e2a\u534a\u6210\u54c1\u8f6f\u4ef6\uff0c\u662f\u4e00\u5957\u53ef\u91cd\u7528\u7684\uff0c\u901a\u7528\u7684\uff0c\u8f6f\u4ef6\u57fa\u7840\u4ee3\u7801\u6a21\u578b<\/em><\/strong><\/p>\n\n\n\n<p>\u5728\u6846\u67b6\u7684\u57fa\u7840\u4e0a\u6784\u5efa\u7f16\u5199\u66f4\u52a0\u9ad8\u6548\uff0c\u89c4\u8303\uff0c\u901a\u7528\uff0c\u53ef\u62d3\u5c55<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mybatis\u662f\u4e00\u6b3e\u6301\u4e45\u5c42\u6846\u67b6\uff0c\u7528\u4e8e\u7b80\u5316JDBC\u7684\u5f00\u53d1 \u6301\u4e45\u5c42\uff1a\u8d1f\u8d23\u5c06\u6570\u636e\u4fdd\u5b58\u5230\u6570\u636e\u5e93\u7684\u90a3\u4e00\u5c42\u4ee3\u7801 JavaE [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-6","post","type-post","status-publish","format-standard","hentry","category-mybatis"],"_links":{"self":[{"href":"https:\/\/note.ui11.cc\/index.php\/wp-json\/wp\/v2\/posts\/6","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/note.ui11.cc\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/note.ui11.cc\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/note.ui11.cc\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/note.ui11.cc\/index.php\/wp-json\/wp\/v2\/comments?post=6"}],"version-history":[{"count":1,"href":"https:\/\/note.ui11.cc\/index.php\/wp-json\/wp\/v2\/posts\/6\/revisions"}],"predecessor-version":[{"id":7,"href":"https:\/\/note.ui11.cc\/index.php\/wp-json\/wp\/v2\/posts\/6\/revisions\/7"}],"wp:attachment":[{"href":"https:\/\/note.ui11.cc\/index.php\/wp-json\/wp\/v2\/media?parent=6"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/note.ui11.cc\/index.php\/wp-json\/wp\/v2\/categories?post=6"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/note.ui11.cc\/index.php\/wp-json\/wp\/v2\/tags?post=6"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}