{"id":72587,"date":"2026-02-06T06:24:55","date_gmt":"2026-02-05T22:24:55","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/72587.html"},"modified":"2026-02-06T06:24:55","modified_gmt":"2026-02-05T22:24:55","slug":"springboot%e6%95%b4%e5%90%88springmvc%e5%85%a8%e8%a7%a3%e6%9e%90","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/72587.html","title":{"rendered":"SpringBoot\u6574\u5408SpringMVC\u5168\u89e3\u6790"},"content":{"rendered":"<p>Spring Boot \u4e0e Spring MVC \u7684\u6574\u5408\u672c\u8d28\u4e0a\u662f\u81ea\u52a8\u5b8c\u6210\u7684&#xff0c;\u56e0\u4e3a Spring Boot \u9ed8\u8ba4\u5185\u5d4c\u4e86\u5bf9 Spring MVC \u7684\u652f\u6301\u3002\u4ee5\u4e0b\u662f\u5173\u952e\u8981\u70b9&#xff1a;<\/p>\n<hr \/>\n<h4>\u6838\u5fc3\u673a\u5236&#xff1a;\u81ea\u52a8\u914d\u7f6e<\/h4>\n<p>Spring Boot \u901a\u8fc7 spring-boot-starter-web \u4f9d\u8d56\u81ea\u52a8\u914d\u7f6e Spring MVC \u7684\u6838\u5fc3\u7ec4\u4ef6&#xff1a;<\/p>\n<p>&lt;dependency&gt;<br \/>\n    &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<br \/>\n    &lt;artifactId&gt;spring-boot-starter-web&lt;\/artifactId&gt;<br \/>\n&lt;\/dependency&gt;<\/p>\n<p>http:\/\/my.tv.sohu.com\/us\/441086388\/698948813.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODgxMy5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698948923.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODkyMy5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698948929.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODkyOS5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698948934.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODkzNC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698948938.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODkzOC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698948944.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODk0NC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698948854.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODg1NC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698948723.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODcyMy5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698948869.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODg2OS5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698948668.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODY2OC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949115.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTExNS5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698948785.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODc4NS5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949056.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTA1Ni5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949249.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTI0OS5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949068.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTA2OC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949071.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTA3MS5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949262.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTI2Mi5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949271.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTI3MS5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949173.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTE3My5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949276.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTI3Ni5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949502.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTUwMi5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949434.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTQzNC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949630.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTYzMC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949388.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTM4OC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949642.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTY0Mi5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949646.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTY0Ni5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949458.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTQ1OC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949462.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTQ2Mi5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949468.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTQ2OC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949719.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTcxOS5zaHRtbA&#061;&#061;.html \u00a0<\/p>\n<p>\u6b64\u4f9d\u8d56\u5305\u542b&#xff1a;<\/p>\n<ul>\n<li>DispatcherServlet&#xff08;\u81ea\u52a8\u6ce8\u518c&#xff09;<\/li>\n<li>\u9ed8\u8ba4\u89c6\u56fe\u89e3\u6790\u5668<\/li>\n<li>\u9759\u6001\u8d44\u6e90\u5904\u7406&#xff08;\u5982 \/static\/**&#xff09;<\/li>\n<li>\u6d88\u606f\u8f6c\u6362\u5668&#xff08;\u5982 JSON \u652f\u6301&#xff09;<\/li>\n<\/ul>\n<hr \/>\n<h4>\u81ea\u5b9a\u4e49\u914d\u7f6e&#xff08;\u53ef\u9009&#xff09;<\/h4>\n<p>\u82e5\u9700\u8986\u76d6\u9ed8\u8ba4\u884c\u4e3a&#xff0c;\u53ef\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f&#xff1a;<\/p>\n<h5>1. \u914d\u7f6e\u7c7b\u7ee7\u627f WebMvcConfigurer<\/h5>\n<p>&#064;Configuration<br \/>\npublic class WebConfig implements WebMvcConfigurer {<\/p>\n<p>    \/\/ \u6ce8\u518c\u62e6\u622a\u5668<br \/>\n    &#064;Override<br \/>\n    public void addInterceptors(InterceptorRegistry registry) {<br \/>\n        registry.addInterceptor(new AuthInterceptor());<br \/>\n    }<\/p>\n<p>    \/\/ \u81ea\u5b9a\u4e49\u89c6\u56fe\u89e3\u6790<br \/>\n    &#064;Override<br \/>\n    public void configureViewResolvers(ViewResolverRegistry registry) {<br \/>\n        registry.jsp(&#034;\/WEB-INF\/views\/&#034;, &#034;.jsp&#034;);<br \/>\n    }<br \/>\n}<\/p>\n<h5>2. \u914d\u7f6e\u6587\u4ef6\u4fee\u6539\u53c2\u6570<\/h5>\n<p>\u5728 application.yml \u4e2d\u8c03\u6574\u9ed8\u8ba4\u503c&#xff1a;<\/p>\n<p>spring:<br \/>\n  mvc:<br \/>\n    static-path-pattern: \/resources\/**  # \u4fee\u6539\u9759\u6001\u8d44\u6e90\u8def\u5f84<br \/>\n    view:<br \/>\n      prefix: \/templates\/<br \/>\n      suffix: .html<\/p>\n<hr \/>\n<h4>\u63a7\u5236\u5668\u793a\u4f8b<\/h4>\n<p>Spring MVC \u7684 &#064;Controller \u53ef\u76f4\u63a5\u4f7f\u7528&#xff1a;<\/p>\n<p>&#064;RestController<br \/>\n&#064;RequestMapping(&#034;\/api&#034;)<br \/>\npublic class UserController {<\/p>\n<p>    &#064;GetMapping(&#034;\/users&#034;)<br \/>\n    public List&lt;User&gt; getUsers() {<br \/>\n        return userService.findAll();<br \/>\n    }<br \/>\n}<\/p>\n<p>http:\/\/my.tv.sohu.com\/us\/441086388\/698948813.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODgxMy5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698948923.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODkyMy5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698948929.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODkyOS5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698948934.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODkzNC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698948938.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODkzOC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698948944.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODk0NC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698948854.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODg1NC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698948723.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODcyMy5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698948869.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODg2OS5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698948668.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODY2OC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949115.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTExNS5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698948785.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0ODc4NS5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949056.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTA1Ni5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949249.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTI0OS5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949068.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTA2OC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949071.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTA3MS5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949262.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTI2Mi5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949271.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTI3MS5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949173.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTE3My5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949276.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTI3Ni5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949502.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTUwMi5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949434.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTQzNC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949630.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTYzMC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949388.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTM4OC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949642.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTY0Mi5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949646.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTY0Ni5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949458.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTQ1OC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949462.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTQ2Mi5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949468.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTQ2OC5zaHRtbA&#061;&#061;.html http:\/\/my.tv.sohu.com\/us\/441086388\/698949719.shtml https:\/\/tv.sohu.com\/v\/dXMvNDQxMDg2Mzg4LzY5ODk0OTcxOS5zaHRtbA&#061;&#061;.html \u00a0<\/p>\n<hr \/>\n<h4>\u5e38\u89c1\u6269\u5c55\u573a\u666f<\/h4>\n<table>\n<tr>\u9700\u6c42\u5b9e\u73b0\u65b9\u5f0f<\/tr>\n<tbody>\n<tr>\n<td>\u5168\u5c40\u5f02\u5e38\u5904\u7406<\/td>\n<td>&#064;ControllerAdvice &#043; &#064;ExceptionHandler<\/td>\n<\/tr>\n<tr>\n<td>\u81ea\u5b9a\u4e49\u6d88\u606f\u8f6c\u6362\u5668<\/td>\n<td>\u91cd\u5199 configureMessageConverters()<\/td>\n<\/tr>\n<tr>\n<td>\u8de8\u57df\u914d\u7f6e<\/td>\n<td>&#064;CrossOrigin \u6216 addCorsMappings()<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h4>\u603b\u7ed3<\/h4>\n<p>Spring Boot \u901a\u8fc7 \u7ea6\u5b9a\u4f18\u4e8e\u914d\u7f6e \u7b80\u5316\u4e86 Spring MVC \u7684\u6574\u5408&#xff1a;<\/p>\n<ul>\n<li>\u9ed8\u8ba4\u914d\u7f6e\u5f00\u7bb1\u5373\u7528<\/li>\n<li>\u901a\u8fc7\u63a5\u53e3\/\u6ce8\u89e3\u7075\u6d3b\u5b9a\u5236<\/li>\n<li>\u65e0\u9700\u624b\u52a8\u914d\u7f6e web.xml \u6216 DispatcherServlet<\/li>\n<\/ul>\n<p>\u63d0\u793a&#xff1a;\u9700\u907f\u514d\u540c\u65f6\u4f7f\u7528 &#064;EnableWebMvc \u6ce8\u89e3&#xff0c;\u5426\u5219\u4f1a\u7981\u7528\u81ea\u52a8\u914d\u7f6e\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Spring Boot \u4e0e Spring MVC \u7684\u6574\u5408\u672c\u8d28\u4e0a\u662f\u81ea\u52a8\u5b8c\u6210\u7684&#xff0c;\u56e0\u4e3a Spring Boot \u9ed8\u8ba4\u5185\u5d4c\u4e86\u5bf9 Spring MVC \u7684\u652f\u6301\u3002\u4ee5\u4e0b\u662f\u5173\u952e\u8981\u70b9&#xff1a; \u6838\u5fc3\u673a\u5236&#xff1a;\u81ea\u52a8\u914d\u7f6e<br \/>\nSpring Boot \u901a\u8fc7 spring-boot-starter-web \u4f9d\u8d56\u81ea\u52a8\u914d\u7f6e Spring MVC \u7684\u6838\u5fc3\u7ec4\u4ef6&#xff1a;<br \/>\norg.springframework.boot&lt;\/group<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[99,98,292],"topic":[],"class_list":["post-72587","post","type-post","status-publish","format-standard","hentry","category-server","tag-java","tag-spring-boot","tag-292"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SpringBoot\u6574\u5408SpringMVC\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/72587.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SpringBoot\u6574\u5408SpringMVC\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"Spring Boot \u4e0e Spring MVC \u7684\u6574\u5408\u672c\u8d28\u4e0a\u662f\u81ea\u52a8\u5b8c\u6210\u7684&#xff0c;\u56e0\u4e3a Spring Boot \u9ed8\u8ba4\u5185\u5d4c\u4e86\u5bf9 Spring MVC \u7684\u652f\u6301\u3002\u4ee5\u4e0b\u662f\u5173\u952e\u8981\u70b9&#xff1a; \u6838\u5fc3\u673a\u5236&#xff1a;\u81ea\u52a8\u914d\u7f6e Spring Boot \u901a\u8fc7 spring-boot-starter-web \u4f9d\u8d56\u81ea\u52a8\u914d\u7f6e Spring MVC \u7684\u6838\u5fc3\u7ec4\u4ef6&#xff1a; org.springframework.boot&lt;\/group\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/72587.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-05T22:24:55+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/72587.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/72587.html\",\"name\":\"SpringBoot\u6574\u5408SpringMVC\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-02-05T22:24:55+00:00\",\"dateModified\":\"2026-02-05T22:24:55+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/72587.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/72587.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/72587.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SpringBoot\u6574\u5408SpringMVC\u5168\u89e3\u6790\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SpringBoot\u6574\u5408SpringMVC\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/72587.html","og_locale":"zh_CN","og_type":"article","og_title":"SpringBoot\u6574\u5408SpringMVC\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"Spring Boot \u4e0e Spring MVC \u7684\u6574\u5408\u672c\u8d28\u4e0a\u662f\u81ea\u52a8\u5b8c\u6210\u7684&#xff0c;\u56e0\u4e3a Spring Boot \u9ed8\u8ba4\u5185\u5d4c\u4e86\u5bf9 Spring MVC \u7684\u652f\u6301\u3002\u4ee5\u4e0b\u662f\u5173\u952e\u8981\u70b9&#xff1a; \u6838\u5fc3\u673a\u5236&#xff1a;\u81ea\u52a8\u914d\u7f6e Spring Boot \u901a\u8fc7 spring-boot-starter-web \u4f9d\u8d56\u81ea\u52a8\u914d\u7f6e Spring MVC \u7684\u6838\u5fc3\u7ec4\u4ef6&#xff1a; org.springframework.boot&lt;\/group","og_url":"https:\/\/www.wsisp.com\/helps\/72587.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-02-05T22:24:55+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/72587.html","url":"https:\/\/www.wsisp.com\/helps\/72587.html","name":"SpringBoot\u6574\u5408SpringMVC\u5168\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-02-05T22:24:55+00:00","dateModified":"2026-02-05T22:24:55+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/72587.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/72587.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/72587.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"SpringBoot\u6574\u5408SpringMVC\u5168\u89e3\u6790"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/72587","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=72587"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/72587\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=72587"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=72587"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=72587"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=72587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}