{"id":1621,"date":"2017-07-10T14:31:03","date_gmt":"2017-07-10T06:31:03","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=1621"},"modified":"2017-07-10T14:31:03","modified_gmt":"2017-07-10T06:31:03","slug":"%e6%90%ad%e5%bb%baspring-mvc%e9%a1%b9%e7%9b%ae%e3%80%81%e6%90%ad%e5%bb%baspring-mvc%e6%a1%86%e6%9e%b6","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=1621","title":{"rendered":"\u642d\u5efaspring mvc\u9879\u76ee\u3001\u642d\u5efaspring mvc\u6846\u67b6"},"content":{"rendered":"<p>\n\t\u6700\u8fd1\u5728\u9762\u8bd5\u4e2d\uff0c\u95ee\u5230\u5f88\u591a\u4f1aSpring Mvc\u7684\uff0c\u5982\u4f55\u642d\u5efa\u4e00\u4e2aSpring MVC\u9879\u76ee\uff1f\u4e00\u4e2a\u4e00\u4e2a\u88ab\u95ee\u50bb\u4e86\uff0c\u53ea\u6709\u6781\u4e2a\u522b\u7684\u56de\u7b54\u8f83\u597d\u3002\u5176\u4ed6\u90fd\u4e0d\u662f\u5f88\u7406\u60f3\uff0c\u4eca\u5929\u603b\u7ed3\u4e00\u4e0bSpring MVC\u6846\u67b6\u9879\u76ee\u7684\u642d\u5efa\uff0c\u8fd9\u662f\u4e00\u4e2a\u7b80\u5355\u7684 Hello word \u5165\u95e8\u6559\u7a0b\u3002\n<\/p>\n<h2>\n\t\u5f00\u53d1\u73af\u5883\u548c\u8fd0\u884c\u73af\u5883<br \/>\n<\/h2>\n<ul>\n<li>\n\t\t\u5f00\u53d1\u5de5\u5177\uff1aeclipse\n\t<\/li>\n<li>\n\t\t\u8fd0\u884c\u73af\u5883\uff1atomcat6.0.20\n\t<\/li>\n<li>\n\t\t\u5de5\u7a0b\uff1a\u52a8\u6001web\u5de5\u7a0b\uff08springmvc-chapter2\uff09\n\t<\/li>\n<li>\n\t\tspring\u6846\u67b6\u4e0b\u8f7d\uff1a<a href=\"http:\/\/download.csdn.net\/download\/cs2523442840dn\/4385038\" name=\"spring-framework-3.1.1.RELEASE-with-docs.zip\" target=\"_blank\" title=\"spring-framework-3.1.1.RELEASE-with-docs.zip\">spring-framework-3.1.1.RELEASE-with-docs.zip<\/a>\n\t<\/li>\n<\/ul>\n<h2>\n\t\u4f9d\u8d56\u7684jar\u5305<br \/>\n<\/h2>\n<p>\n\tSpring\u6846\u67b6jar\u5305\uff1a<br \/>\n\t\u4e3a\u4e86\u7b80\u5355\uff0c\u5c06spring-framework-3.1.1.RELEASE-with-docs.zip\/dist\/\u4e0b\u7684\u6240\u6709jar\u5305\u62f7\u8d1d\u5230\u9879\u76ee\u7684WEB-INF\/lib\u76ee\u5f55\u4e0b\uff1b<br \/>\n\tSpring\u6846\u67b6\u4f9d\u8d56\u7684jar\u5305\uff1a<br \/>\n\t\u9700\u8981\u6dfb\u52a0Apache commons logging\u65e5\u5fd7\uff0c\u6b64\u5904\u4f7f\u7528\u7684\u662fcommons.logging-1.1.1.jar\uff1b<br \/>\n\t\u9700\u8981\u6dfb\u52a0jstl\u6807\u7b7e\u5e93\u652f\u6301\uff0c\u6b64\u5904\u4f7f\u7528\u7684\u662fjstl-1.1.2.jar\u548cstandard-1.1.2.jar\uff1b\n<\/p>\n<h2>\n\t\u524d\u7aef\u63a7\u5236\u5668\u7684\u914d\u7f6e<br \/>\n<\/h2>\n<p>\n\t\u5728\u6211\u4eec\u7684web.xml\u4e2d\u6dfb\u52a0\u5982\u4e0b\u914d\u7f6e\uff1a\n<\/p>\n<pre class=\"brush:xml;\">\r\n&lt;servlet&gt;  \r\n    &lt;servlet-name&gt;chapter2&lt;\/servlet-name&gt;  \r\n    &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;\/servlet-class&gt;  \r\n    &lt;load-on-startup&gt;1&lt;\/load-on-startup&gt;  \r\n&lt;\/servlet&gt;  \r\n&lt;servlet-mapping&gt;  \r\n    &lt;servlet-name&gt;chapter2&lt;\/servlet-name&gt;  \r\n    &lt;url-pattern&gt;\/&lt;\/url-pattern&gt;  \r\n&lt;\/servlet-mapping&gt;  <\/pre>\n<ul>\n<li>\n\t\tload-on-startup\uff1a\u8868\u793a\u542f\u52a8\u5bb9\u5668\u65f6\u521d\u59cb\u5316\u8be5Servlet\uff1b\n\t<\/li>\n<li>\n\t\turl-pattern\uff1a\u8868\u793a\u54ea\u4e9b\u8bf7\u6c42\u4ea4\u7ed9Spring Web MVC\u5904\u7406\uff0c &ldquo;\/&rdquo; \u662f\u7528\u6765\u5b9a\u4e49\u9ed8\u8ba4servlet\u6620\u5c04\u7684\u3002\u4e5f\u53ef\u4ee5\u5982&ldquo;*.html&rdquo;\u8868\u793a\u62e6\u622a\u6240\u6709\u4ee5html\u4e3a\u6269\u5c55\u540d\u7684\u8bf7\u6c42\u3002\n\t<\/li>\n<\/ul>\n<p>\n\t\u81ea\u6b64\u8bf7\u6c42\u5df2\u4ea4\u7ed9Spring Web MVC\u6846\u67b6\u5904\u7406\uff0c\u56e0\u6b64\u6211\u4eec\u9700\u8981\u914d\u7f6eSpring\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u9ed8\u8ba4DispatcherServlet\u4f1a\u52a0\u8f7dWEB-INF\/[DispatcherServlet\u7684Servlet\u540d\u5b57]-servlet.xml\u914d\u7f6e\u6587\u4ef6\u3002\u672c\u793a\u4f8b\u4e3aWEB-INF\/ chapter2-servlet.xml\u3002\n<\/p>\n<h2>\n\t\u5728Spring\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6eHandlerMapping\u3001HandlerAdapter<br \/>\n<\/h2>\n<p>\n\t\u5177\u4f53\u914d\u7f6e\u5728WEB-INF\/ chapter2-servlet.xml\u6587\u4ef6\u4e2d\uff1a\n<\/p>\n<pre class=\"brush:xml;\">\r\n&lt;!-- HandlerMapping --&gt;  \r\n&lt;bean class=&quot;org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping&quot;\/&gt;  \r\n&lt;!-- HandlerAdapter --&gt;  \r\n&lt;bean class=&quot;org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter&quot;\/&gt;<\/pre>\n<p>\n\tBeanNameUrlHandlerMapping\uff1a\u8868\u793a\u5c06\u8bf7\u6c42\u7684URL\u548cBean\u540d\u5b57\u6620\u5c04\uff0c\u5982URL\u4e3a &ldquo;\u4e0a\u4e0b\u6587\/hello&rdquo;\uff0c\u5219Spring\u914d\u7f6e\u6587\u4ef6\u5fc5\u987b\u6709\u4e00\u4e2a\u540d\u5b57\u4e3a&ldquo;\/hello&rdquo;\u7684Bean\uff0c\u4e0a\u4e0b\u6587\u9ed8\u8ba4\u5ffd\u7565\u3002<br \/>\n\tSimpleControllerHandlerAdapter\uff1a\u8868\u793a\u6240\u6709\u5b9e\u73b0\u4e86org.springframework.web.servlet.mvc.Controller\u63a5\u53e3\u7684Bean\u53ef\u4ee5\u4f5c\u4e3aSpring Web MVC\u4e2d\u7684\u5904\u7406\u5668\u3002\u5982\u679c\u9700\u8981\u5176\u4ed6\u7c7b\u578b\u7684\u5904\u7406\u5668\u53ef\u4ee5\u901a\u8fc7\u5b9e\u73b0HadlerAdapter\u6765\u89e3\u51b3\u3002\n<\/p>\n<h2>\n\t\u5728Spring\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6eViewResolver<br \/>\n<\/h2>\n<p>\n\t\u5177\u4f53\u914d\u7f6e\u5728WEB-INF\/ chapter2-servlet.xml\u6587\u4ef6\u4e2d\uff1a\n<\/p>\n<pre class=\"brush:xml;\">\r\n&lt;!-- ViewResolver --&gt;  \r\n&lt;bean class=&quot;org.springframework.web.servlet.view.InternalResourceViewResolver&quot;&gt;  \r\n    &lt;property name=&quot;viewClass&quot; value=&quot;org.springframework.web.servlet.view.JstlView&quot;\/&gt;  \r\n    &lt;property name=&quot;prefix&quot; value=&quot;\/WEB-INF\/jsp\/&quot;\/&gt;  \r\n    &lt;property name=&quot;suffix&quot; value=&quot;.jsp&quot;\/&gt;  \r\n&lt;\/bean&gt;  <\/pre>\n<ul>\n<li>\n\t\tInternalResourceViewResolver\uff1a\u7528\u4e8e\u652f\u6301Servlet\u3001JSP\u89c6\u56fe\u89e3\u6790\uff1b\n\t<\/li>\n<li>\n\t\tviewClass\uff1aJstlView\u8868\u793aJSP\u6a21\u677f\u9875\u9762\u9700\u8981\u4f7f\u7528JSTL\u6807\u7b7e\u5e93\uff0cclasspath\u4e2d\u5fc5\u987b\u5305\u542bjstl\u7684\u76f8\u5173jar\u5305\uff1b\n\t<\/li>\n<li>\n\t\tprefix\u548csuffix\uff1a\u67e5\u627e\u89c6\u56fe\u9875\u9762\u7684\u524d\u7f00\u548c\u540e\u7f00\uff08\u524d\u7f00[\u903b\u8f91\u89c6\u56fe\u540d]\u540e\u7f00\uff09\uff0c\u6bd4\u5982\u4f20\u8fdb\u6765\u7684\u903b\u8f91\u89c6\u56fe\u540d\u4e3ahello\uff0c\u5219\u8be5\u8be5jsp\u89c6\u56fe\u9875\u9762\u5e94\u8be5\u5b58\u653e\u5728&ldquo;WEB-INF\/jsp\/hello.jsp&rdquo;\uff1b\n\t<\/li>\n<\/ul>\n<h2>\n\t\u5f00\u53d1\u5904\u7406\u5668\/\u9875\u9762\u63a7\u5236\u5668<br \/>\n<\/h2>\n<pre class=\"brush:java;\">\r\npackage cn.javass.chapter2.web.controller;  \r\nimport javax.servlet.http.HttpServletRequest;  \r\nimport javax.servlet.http.HttpServletResponse;  \r\nimport org.springframework.web.servlet.ModelAndView;  \r\nimport org.springframework.web.servlet.mvc.Controller;  \r\npublic class HelloWorldController implements Controller {  \r\n    @Override  \r\n    public ModelAndView handleRequest(HttpServletRequest req, HttpServletResponse resp) throws Exception {  \r\n       \/\/1\u3001\u6536\u96c6\u53c2\u6570\u3001\u9a8c\u8bc1\u53c2\u6570  \r\n       \/\/2\u3001\u7ed1\u5b9a\u53c2\u6570\u5230\u547d\u4ee4\u5bf9\u8c61  \r\n       \/\/3\u3001\u5c06\u547d\u4ee4\u5bf9\u8c61\u4f20\u5165\u4e1a\u52a1\u5bf9\u8c61\u8fdb\u884c\u4e1a\u52a1\u5904\u7406  \r\n       \/\/4\u3001\u9009\u62e9\u4e0b\u4e00\u4e2a\u9875\u9762  \r\n       ModelAndView mv = new ModelAndView();  \r\n       \/\/\u6dfb\u52a0\u6a21\u578b\u6570\u636e \u53ef\u4ee5\u662f\u4efb\u610f\u7684POJO\u5bf9\u8c61  \r\n       mv.addObject(&quot;message&quot;, &quot;Hello World!&quot;);  \r\n       \/\/\u8bbe\u7f6e\u903b\u8f91\u89c6\u56fe\u540d\uff0c\u89c6\u56fe\u89e3\u6790\u5668\u4f1a\u6839\u636e\u8be5\u540d\u5b57\u89e3\u6790\u5230\u5177\u4f53\u7684\u89c6\u56fe\u9875\u9762  \r\n       mv.setViewName(&quot;hello&quot;);  \r\n       return mv;  \r\n    }  \r\n}  <\/pre>\n<ul>\n<li>\n\t\torg.springframework.web.servlet.mvc.Controller\uff1a\u9875\u9762\u63a7\u5236\u5668\/\u5904\u7406\u5668\u5fc5\u987b\u5b9e\u73b0Controller\u63a5\u53e3\uff0c\u6ce8\u610f\u522b\u9009\u9519\u4e86\uff1b\u540e\u8fb9\u6211\u4eec\u4f1a\u5b66\u4e60\u5176\u4ed6\u7684\u5904\u7406\u5668\u5b9e\u73b0\u65b9\u5f0f\uff1b\n\t<\/li>\n<li>\n\t\tpublic ModelAndView handleRequest(HttpServletRequest req, HttpServletResponse resp) \uff1a\u529f\u80fd\u5904\u7406\u65b9\u6cd5\uff0c\u5b9e\u73b0\u76f8\u5e94\u7684\u529f\u80fd\u5904\u7406\uff0c\u6bd4\u5982\u6536\u96c6\u53c2\u6570\u3001\u9a8c\u8bc1\u53c2\u6570\u3001\u7ed1\u5b9a\u53c2\u6570\u5230\u547d\u4ee4\u5bf9\u8c61\u3001\u5c06\u547d\u4ee4\u5bf9\u8c61\u4f20\u5165\u4e1a\u52a1\u5bf9\u8c61\u8fdb\u884c\u4e1a\u52a1\u5904\u7406\u3001\u6700\u540e\u8fd4\u56deModelAndView\u5bf9\u8c61\uff1b\n\t<\/li>\n<li>\n\t\tModelAndView\uff1a\u5305\u542b\u4e86\u89c6\u56fe\u8981\u5b9e\u73b0\u7684\u6a21\u578b\u6570\u636e\u548c\u903b\u8f91\u89c6\u56fe\u540d\uff1b&ldquo;mv.addObject(&quot;message&quot;, &quot;Hello World!&quot;);\n\t<\/li>\n<li>\n\t\t&rdquo;\u8868\u793a\u6dfb\u52a0\u6a21\u578b\u6570\u636e\uff0c\u6b64\u5904\u53ef\u4ee5\u662f\u4efb\u610fPOJO\u5bf9\u8c61\uff1b&ldquo;mv.setViewName(&quot;hello&quot;);&rdquo;\u8868\u793a\u8bbe\u7f6e\u903b\u8f91\u89c6\u56fe\u540d\u4e3a&ldquo;hello&rdquo;\uff0c\u89c6\u56fe\u89e3\u6790\u5668\u4f1a\u5c06\u5176\u89e3\u6790\u4e3a\u5177\u4f53\u7684\u89c6\u56fe\uff0c\u5982\u524d\u8fb9\u7684\u89c6\u56fe\u89e3\u6790\u5668InternalResourceVi\u3002wResolver\u4f1a\u5c06\u5176\u89e3\u6790\u4e3a&ldquo;WEB-INF\/jsp\/hello.jsp&rdquo;\u3002\n\t<\/li>\n<\/ul>\n<p>\n\t\u6211\u4eec\u9700\u8981\u5c06\u5176\u6dfb\u52a0\u5230Spring\u914d\u7f6e\u6587\u4ef6(WEB-INF\/chapter2-servlet.xml)\uff0c\u8ba9\u5176\u63a5\u53d7Spring IoC\u5bb9\u5668\u7ba1\u7406:\n<\/p>\n<pre class=\"brush:xml;\">\r\n&lt;!-- \u5904\u7406\u5668 --&gt;  \r\n&lt;bean name=&quot;\/hello&quot; class=&quot;cn.javass.chapter2.web.controller.HelloWorldController&quot;\/&gt; <\/pre>\n<p>\n\tname=&quot;\/hello&quot;\uff1a\u524d\u8fb9\u914d\u7f6e\u7684BeanNameUrlHandlerMapping\uff0c\u8868\u793a\u5982\u8fc7\u8bf7\u6c42\u7684URL\u4e3a &ldquo;\u4e0a\u4e0b\u6587\/hello&rdquo;\uff0c\u5219\u5c06\u4f1a\u4ea4\u7ed9\u8be5Bean\u8fdb\u884c\u5904\u7406\u3002&nbsp;\n<\/p>\n<h2>\n\t\u5f00\u53d1\u89c6\u56fe\u9875\u9762<br \/>\n<\/h2>\n<p>\n\t\u521b\u5efa \/WEB-INF\/jsp\/hello.jsp\u89c6\u56fe\u9875\u9762\uff1a\n<\/p>\n<pre class=\"brush:xml;\">\r\n&lt;%@ page language=&quot;java&quot; contentType=&quot;text\/html; charset=UTF-8&quot; pageEncoding=&quot;UTF-8&quot;%&gt;  \r\n&lt;!DOCTYPE html PUBLIC &quot;-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN&quot; &quot;http:\/\/www.w3.org\/TR\/html4\/loose.dtd&quot;&gt;  \r\n&lt;html&gt;  \r\n&lt;head&gt;  \r\n&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text\/html; charset=UTF-8&quot;&gt;  \r\n&lt;title&gt;Hello World&lt;\/title&gt;  \r\n&lt;\/head&gt;  \r\n&lt;body&gt;  \r\n${message}  \r\n&lt;\/body&gt;  \r\n&lt;\/html&gt;  <\/pre>\n<p>\n\t${message}\u8868\u793a\u663e\u793a\u7531HelloWorldController\u5904\u7406\u5668\u4f20\u8fc7\u6765\u7684\u6a21\u578b\u6570\u636e\u3002\n<\/p>\n<h2>\n\t\u542f\u52a8\u670d\u52a1\u5668\u8fd0\u884c\u6d4b\u8bd5<br \/>\n<\/h2>\n<p>\n\t\u901a\u8fc7\u8bf7\u6c42\uff1ahttp:\/\/localhost:9080\/springmvc-chapter2\/hello\uff0c\u5982\u679c\u9875\u9762\u8f93\u51fa&ldquo;Hello World! &rdquo;\u5c31\u8868\u660e\u6211\u4eec\u6210\u529f\u4e86\uff01\n<\/p>\n<h2>\n\t\u8fd0\u884c\u6d41\u7a0b\u5206\u6790<br \/>\n<\/h2>\n<p>\n\t<img decoding=\"async\" alt=\"Spring MVC\u6846\u67b6\u5904\u7406\u539f\u7406\" src=\"http:\/\/img.bbs.csdn.net\/upload\/201707\/10\/1499667867_933937.jpg\" style=\"width: 860px;height: 409px\" \/>\n<\/p>\n<p>\n\t\u6267\u884c\u6b65\u9aa4\uff1a\n<\/p>\n<ol>\n<li>\n\t\t\u9996\u5148\u7528\u6237\u53d1\u9001\u8bf7\u6c42http:\/\/localhost:9080\/springmvc-chapter2\/hello&mdash;&mdash;&gt;web\u5bb9\u5668\uff0cweb\u5bb9\u5668\u6839\u636e&ldquo;\/hello&rdquo;\u8def\u5f84\u6620\u5c04\u5230DispatcherServlet\uff08url-pattern\u4e3a\/\uff09\u8fdb\u884c\u5904\u7406\uff1b\n\t<\/li>\n<li>\n\t\tDispatcherServlet&mdash;&mdash;&gt;BeanNameUrlHandlerMapping\u8fdb\u884c\u8bf7\u6c42\u5230\u5904\u7406\u7684\u6620\u5c04\uff0cBeanNameUrlHandlerMapping\u5c06&ldquo;\/hello&rdquo;\u8def\u5f84\u76f4\u63a5\u6620\u5c04\u5230\u540d\u5b57\u4e3a&ldquo;\/hello&rdquo;\u7684Bean\u8fdb\u884c\u5904\u7406\uff0c\u5373HelloWorldController\uff0cBeanNameUrlHandlerMapping\u5c06\u5176\u5305\u88c5\u4e3aHandlerExecutionChain\uff08\u53ea\u5305\u62ecHelloWorldController\u5904\u7406\u5668\uff0c\u6ca1\u6709\u62e6\u622a\u5668\uff09\uff1b\n\t<\/li>\n<li>\n\t\tDispatcherServlet&mdash;&mdash;&gt; SimpleControllerHandlerAdapter\uff0cSimpleControllerHandlerAdapter\u5c06HandlerExecutionChain\u4e2d\u7684\u5904\u7406\u5668\uff08HelloWorldController\uff09\u9002\u914d\u4e3aSimpleControllerHandlerAdapter\uff1b\n\t<\/li>\n<li>\n\t\tSimpleControllerHandlerAdapter&mdash;&mdash;&gt; HelloWorldController\u5904\u7406\u5668\u529f\u80fd\u5904\u7406\u65b9\u6cd5\u7684\u8c03\u7528\uff0cSimpleControllerHandlerAdapter\u5c06\u4f1a\u8c03\u7528\u5904\u7406\u5668\u7684handleRequest\u65b9\u6cd5\u8fdb\u884c\u529f\u80fd\u5904\u7406\uff0c\u8be5\u5904\u7406\u65b9\u6cd5\u8fd4\u56de\u4e00\u4e2aModelAndView\u7ed9DispatcherServlet\uff1b\n\t<\/li>\n<li>\n\t\thello\uff08ModelAndView\u7684\u903b\u8f91\u89c6\u56fe\u540d\uff09&mdash;&mdash;&gt;InternalResourceViewResolver\uff0c InternalResourceViewResolver\u4f7f\u7528JstlView\uff0c\u5177\u4f53\u89c6\u56fe\u9875\u9762\u5728\/WEB-INF\/jsp\/hello.jsp\uff1b\n\t<\/li>\n<li>\n\t\tJstlView\uff08\/WEB-INF\/jsp\/hello.jsp\uff09&mdash;&mdash;&gt;\u6e32\u67d3\uff0c\u5c06\u5728\u5904\u7406\u5668\u4f20\u5165\u7684\u6a21\u578b\u6570\u636e(message=HelloWorld\uff01)\u5728\u89c6\u56fe\u4e2d\u5c55\u793a\u51fa\u6765\uff1b\n\t<\/li>\n<li>\n\t\t\u8fd4\u56de\u63a7\u5236\u6743\u7ed9DispatcherServlet\uff0c\u7531DispatcherServlet\u8fd4\u56de\u54cd\u5e94\u7ed9\u7528\u6237\uff0c\u5230\u6b64\u4e00\u4e2a\u6d41\u7a0b\u7ed3\u675f\u3002\n\t<\/li>\n<\/ol>\n<p>\n\t\u5230\u6b64HelloWorld\u5c31\u5b8c\u6210\u4e86\uff0c\u6b65\u9aa4\u662f\u4e0d\u662f\u6709\u70b9\u591a\uff1f\u800c\u4e14\u56de\u5fc6\u4e0b\u6211\u4eec\u4e3b\u8981\u8fdb\u884c\u4e86\u5982\u4e0b\u914d\u7f6e\uff1a\n<\/p>\n<ol>\n<li>\n\t\t\u524d\u7aef\u63a7\u5236\u5668DispatcherServlet\uff1b\n\t<\/li>\n<li>\n\t\tHandlerMapping\n\t<\/li>\n<li>\n\t\tHandlerAdapter\n\t<\/li>\n<li>\n\t\tViewResolver\n\t<\/li>\n<li>\n\t\t\u5904\u7406\u5668\/\u9875\u9762\u63a7\u5236\u5668\n\t<\/li>\n<li>\n\t\t\u89c6\u56fe\n\t<\/li>\n<\/ol>\n<p>\n\t\u672c\u6587\u53ea\u662f\u6700\u521d\u7ea7\u7684\u4f7f\u7528\uff0c\u5173\u4e8eSpring MVC\uff0cDispatcherServlet\uff0c\u6ce8\u89e3\uff0c\u914d\u7f6e\u7b49\u6211\u4eec\u63a5\u7740\u5b66\u4e60\uff0c\u656c\u8bf7\u671f\u5f85\u4e0b\u7bc7\u6587\u7ae0\u8bb2\u89e3\uff01<\/p>\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=1621\">\u642d\u5efaspring mvc\u9879\u76ee\u3001\u642d\u5efaspring mvc\u6846\u67b6<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u5728\u9762\u8bd5\u4e2d\uff0c\u95ee\u5230\u5f88\u591a\u4f1aSpring Mvc\u7684\uff0c\u5982\u4f55\u642d\u5efa\u4e00\u4e2aSpring MVC\u9879\u76ee\uff1f\u4e00\u4e2a\u4e00\u4e2a\u88ab\u95ee\u50bb\u4e86\uff0c\u53ea\u6709\u6781 [&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":[1350,1360,1359,1361,1358],"class_list":["post-1621","post","type-post","status-publish","format-standard","hentry","category-java","tag-spring-mvc","tag-spring-mvc-"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1621","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=1621"}],"version-history":[{"count":2,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1621\/revisions"}],"predecessor-version":[{"id":1624,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1621\/revisions\/1624"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}