{"id":2128,"date":"2017-10-11T16:08:32","date_gmt":"2017-10-11T08:08:32","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=2128"},"modified":"2017-10-11T16:08:32","modified_gmt":"2017-10-11T08:08:32","slug":"spring-mvc%e7%ae%80%e4%bb%8b%e4%b8%8e%e8%bf%90%e8%a1%8c%e5%8e%9f%e7%90%86","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=2128","title":{"rendered":"Spring MVC\u7b80\u4ecb\u4e0e\u8fd0\u884c\u539f\u7406"},"content":{"rendered":"<p>\n\tSpring\u7684\u6a21\u578b-\u89c6\u56fe-\u63a7\u5236\u5668\uff08MVC\uff09\u6846\u67b6\u662f\u56f4\u7ed5\u4e00\u4e2aDispatcherServlet\u6765\u8bbe\u8ba1\u7684\uff0c\u8fd9\u4e2aServlet\u4f1a\u628a\u8bf7\u6c42\u5206\u53d1\u7ed9\u5404\u4e2a\u5904\u7406\u5668\uff0c\u5e76\u652f\u6301\u53ef\u914d\u7f6e\u7684\u5904\u7406\u5668\u6620\u5c04\u3001\u89c6\u56fe\u6e32\u67d3\u3001\u672c\u5730\u5316\u3001\u65f6\u533a\u4e0e\u4e3b\u9898\u6e32\u67d3\u7b49\uff0c\u751a\u81f3\u8fd8\u80fd\u652f\u6301\u6587\u4ef6\u4e0a\u4f20\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"Spring\u7684\u6a21\u578b-\u89c6\u56fe-\u63a7\u5236\u5668\uff08MVC\uff09\u6846\u67b6\" src=\"http:\/\/img.bbs.csdn.net\/upload\/201710\/11\/1507708928_354693.png\" style=\"width: 584px;height: 324px\" \/>\n<\/p>\n<ul>\n<li>\n\t\t(1) Http\u8bf7\u6c42\uff1a\u5ba2\u6237\u7aef\u8bf7\u6c42\u63d0\u4ea4\u5230DispatcherServlet\u3002\n\t<\/li>\n<li>\n\t\t(2) \u5bfb\u627e\u5904\u7406\u5668\uff1a\u7531DispatcherServlet\u63a7\u5236\u5668\u67e5\u8be2\u4e00\u4e2a\u6216\u591a\u4e2aHandlerMapping\uff0c\u627e\u5230\u5904\u7406\u8bf7\u6c42\u7684Controller\u3002\n\t<\/li>\n<li>\n\t\t(3) \u8c03\u7528\u5904\u7406\u5668\uff1aDispatcherServlet\u5c06\u8bf7\u6c42\u63d0\u4ea4\u5230Controller\u3002\n\t<\/li>\n<li>\n\t\t(4)(5)\u8c03\u7528\u4e1a\u52a1\u5904\u7406\u548c\u8fd4\u56de\u7ed3\u679c\uff1aController\u8c03\u7528\u4e1a\u52a1\u903b\u8f91\u5904\u7406\u540e\uff0c\u8fd4\u56deModelAndView\u3002\n\t<\/li>\n<li>\n\t\t(6)(7)\u5904\u7406\u89c6\u56fe\u6620\u5c04\u5e76\u8fd4\u56de\u6a21\u578b\uff1a DispatcherServlet\u67e5\u8be2\u4e00\u4e2a\u6216\u591a\u4e2aViewResoler\u89c6\u56fe\u89e3\u6790\u5668\uff0c\u627e\u5230ModelAndView\u6307\u5b9a\u7684\u89c6\u56fe\u3002\n\t<\/li>\n<li>\n\t\t(8) Http\u54cd\u5e94\uff1a\u89c6\u56fe\u8d1f\u8d23\u5c06\u7ed3\u679c\u663e\u793a\u5230\u5ba2\u6237\u7aef\u3002\n\t<\/li>\n<\/ul>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=2128\">Spring MVC\u7b80\u4ecb\u4e0e\u8fd0\u884c\u539f\u7406<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>Spring\u7684\u6a21\u578b-\u89c6\u56fe-\u63a7\u5236\u5668\uff08MVC\uff09\u6846\u67b6\u662f\u56f4\u7ed5\u4e00\u4e2aDispatcherServlet\u6765\u8bbe\u8ba1\u7684\uff0c\u8fd9\u4e2aSer [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[551,1350],"class_list":["post-2128","post","type-post","status-publish","format-standard","hentry","category-java","tag-spring","tag-spring-mvc"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2128"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2128\/revisions"}],"predecessor-version":[{"id":2129,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2128\/revisions\/2129"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}