{"id":53034,"date":"2025-08-11T23:04:27","date_gmt":"2025-08-11T15:04:27","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/53034.html"},"modified":"2025-08-11T23:04:27","modified_gmt":"2025-08-11T15:04:27","slug":"springboot%e5%88%87%e6%8d%a2-servlet-%e5%ae%b9%e5%99%a8%e4%b8%baundertow","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/53034.html","title":{"rendered":"SpringBoot\u5207\u6362 Servlet \u5bb9\u5668\u4e3aUndertow"},"content":{"rendered":"<h2 id=\"nhjJX\">\u9898\u76ee\u8be6\u7ec6\u7b54\u6848<\/h2>\n<p id=\"ub5af1fc4\">Spring Boot \u9ed8\u8ba4\u4f7f\u7528 Tomcat \u4f5c\u4e3a\u5d4c\u5165\u5f0f\u7684 Servlet \u5bb9\u5668&#xff0c;\u4f46\u4f60\u4e5f\u53ef\u4ee5\u5207\u6362\u5230 Undertow\u3002Undertow \u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u3001\u9ad8\u6027\u80fd\u7684 Web \u670d\u52a1\u5668\u548c Servlet \u5bb9\u5668\u3002<\/p>\n<h3 id=\"kdCOg\">\u6b65\u9aa4 1&#xff1a;\u6392\u9664 Tomcat \u4f9d\u8d56<\/h3>\n<p id=\"u533ea6e4\">\u9700\u8981\u5728pom.xml\u6587\u4ef6&#xff08;\u5982\u679c\u4f7f\u7528\u7684\u662f Maven&#xff09;\u6216build.gradle\u6587\u4ef6&#xff08;\u5982\u679c\u4f7f\u7528\u7684\u662f Gradle&#xff09;\u4e2d\u6392\u9664 Tomcat \u4f9d\u8d56\u3002<\/p>\n<h5 id=\"0e554ece\">Maven:<\/h5>\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;exclusions&gt;<br \/>\n        &lt;exclusion&gt;<br \/>\n            &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<br \/>\n            &lt;artifactId&gt;spring-boot-starter-tomcat&lt;\/artifactId&gt;<br \/>\n        &lt;\/exclusion&gt;<br \/>\n    &lt;\/exclusions&gt;<br \/>\n&lt;\/dependency&gt;<\/p>\n<h5 id=\"f56a0924\">Gradle:<\/h5>\n<p>implementation(&#039;org.springframework.boot:spring-boot-starter-web&#039;) {<br \/>\n    exclude group: &#039;org.springframework.boot&#039;, module: &#039;spring-boot-starter-tomcat&#039;<br \/>\n}<\/p>\n<h3 id=\"AWrvo\">\u6b65\u9aa4 2&#xff1a;\u6dfb\u52a0 Undertow \u4f9d\u8d56<\/h3>\n<p id=\"uc99a6dc3\">\u6dfb\u52a0 Undertow \u4f9d\u8d56\u3002<\/p>\n<h5 id=\"0e554ece-1\">Maven:<\/h5>\n<p>&lt;dependency&gt;<br \/>\n    &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<br \/>\n    &lt;artifactId&gt;spring-boot-starter-undertow&lt;\/artifactId&gt;<br \/>\n&lt;\/dependency&gt;<\/p>\n<h3 id=\"UZCWA\">\u6b65\u9aa4 3&#xff1a;\u786e\u8ba4\u914d\u7f6e<\/h3>\n<p id=\"u8990639c\">\u786e\u4fdd\u4f60\u7684 Spring Boot \u5e94\u7528\u7a0b\u5e8f\u7684\u4e3b\u7c7b\u6ca1\u6709\u7279\u5b9a\u4e8e Tomcat \u7684\u914d\u7f6e\u3002\u901a\u5e38\u60c5\u51b5\u4e0d\u9700\u8981\u505a\u4efb\u4f55\u4fee\u6539&#xff0c;\u56e0\u4e3a Spring Boot \u4f1a\u81ea\u52a8\u914d\u7f6e Undertow\u3002<\/p>\n<h4 id=\"c022dc8b\">\u793a\u4f8bpom.xml<\/h4>\n<p id=\"ueb3a9ef9\">\n<p>&lt;project xmlns&#061;&#034;http:\/\/maven.apache.org\/POM\/4.0.0&#034;<br \/>\n         xmlns:xsi&#061;&#034;http:\/\/www.w3.org\/2001\/XMLSchema-instance&#034;<br \/>\n         xsi:schemaLocation&#061;&#034;http:\/\/maven.apache.org\/POM\/4.0.0 http:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd&#034;&gt;<br \/>\n    &lt;modelVersion&gt;4.0.0&lt;\/modelVersion&gt;<br \/>\n    &lt;groupId&gt;com.example&lt;\/groupId&gt;<br \/>\n    &lt;artifactId&gt;demo&lt;\/artifactId&gt;<br \/>\n    &lt;version&gt;0.0.1-SNAPSHOT&lt;\/version&gt;<br \/>\n    &lt;name&gt;demo&lt;\/name&gt;<br \/>\n    &lt;description&gt;Demo project for Spring Boot&lt;\/description&gt;<br \/>\n    &lt;parent&gt;<br \/>\n        &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<br \/>\n        &lt;artifactId&gt;spring-boot-starter-parent&lt;\/artifactId&gt;<br \/>\n        &lt;version&gt;2.5.4&lt;\/version&gt;<br \/>\n        &lt;relativePath\/&gt; &lt;!&#8211; lookup parent from repository &#8211;&gt;<br \/>\n    &lt;\/parent&gt;<\/p>\n<p>    &lt;properties&gt;<br \/>\n        &lt;java.version&gt;11&lt;\/java.version&gt;<br \/>\n    &lt;\/properties&gt;<\/p>\n<p>    &lt;dependencies&gt;<br \/>\n        &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;exclusions&gt;<br \/>\n                &lt;exclusion&gt;<br \/>\n                    &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<br \/>\n                    &lt;artifactId&gt;spring-boot-starter-tomcat&lt;\/artifactId&gt;<br \/>\n                &lt;\/exclusion&gt;<br \/>\n            &lt;\/exclusions&gt;<br \/>\n        &lt;\/dependency&gt;<br \/>\n        &lt;dependency&gt;<br \/>\n            &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<br \/>\n            &lt;artifactId&gt;spring-boot-starter-undertow&lt;\/artifactId&gt;<br \/>\n        &lt;\/dependency&gt;<br \/>\n        &lt;dependency&gt;<br \/>\n            &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<br \/>\n            &lt;artifactId&gt;spring-boot-starter-test&lt;\/artifactId&gt;<br \/>\n            &lt;scope&gt;test&lt;\/scope&gt;<br \/>\n        &lt;\/dependency&gt;<br \/>\n    &lt;\/dependencies&gt;<\/p>\n<p>    &lt;build&gt;<br \/>\n        &lt;plugins&gt;<br \/>\n            &lt;plugin&gt;<br \/>\n                &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<br \/>\n                &lt;artifactId&gt;spring-boot-maven-plugin&lt;\/artifactId&gt;<br \/>\n            &lt;\/plugin&gt;<br \/>\n        &lt;\/plugins&gt;<br \/>\n    &lt;\/build&gt;<\/p>\n<p>&lt;\/project&gt;<\/p>\n<h3 id=\"XFDwc\">\u9a8c\u8bc1<\/h3>\n<p id=\"u43a2553e\">\u542f\u52a8Spring Boot \u5e94\u7528\u7a0b\u5e8f\u3002\u5e94\u8be5\u80fd\u591f\u5728\u63a7\u5236\u53f0\u65e5\u5fd7\u4e2d\u770b\u5230 Undertow \u670d\u52a1\u5668\u542f\u52a8\u7684\u6d88\u606f&#xff0c;\u800c\u4e0d\u662f Tomcat\u3002<\/p>\n<p id=\"uf714bacd\">2021-08-30 10:00:00.000 INFO 12345 &#8212; [ main] io.undertow : starting undertow server<\/p>\n<h2 id=\"xueh7\">Spring Boot \u5207\u6362\u9ed8\u8ba4 Servlet \u5bb9\u5668\u5230 Undertow \u7684\u8be6\u7ec6\u6307\u5357<\/h2>\n<h3 id=\"dBVve\">\u4e3a\u4ec0\u4e48\u9009\u62e9 Undertow&#xff1f;<\/h3>\n<p id=\"u6fe495b9\">Undertow \u662f\u4e00\u4e2a\u7531 Red Hat \u5f00\u53d1\u7684\u8f7b\u91cf\u7ea7\u3001\u9ad8\u6027\u80fd\u7684 Web \u670d\u52a1\u5668\u548c Servlet \u5bb9\u5668&#xff0c;\u76f8\u6bd4 Tomcat \u6709\u4ee5\u4e0b\u4f18\u52bf&#xff1a;<\/p>\n<ul>\n<li id=\"uc688195e\">\u66f4\u8f7b\u91cf\u7ea7&#xff0c;\u5185\u5b58\u5360\u7528\u66f4\u5c11<\/li>\n<li id=\"u7d7e66fb\">\u66f4\u9ad8\u7684\u6027\u80fd&#xff0c;\u7279\u522b\u662f\u5728\u9ad8\u5e76\u53d1\u573a\u666f\u4e0b<\/li>\n<li id=\"ue570fd0d\">\u652f\u6301 HTTP\/2<\/li>\n<li id=\"u6c7c1a1a\">\u7075\u6d3b\u7684\u67b6\u6784\u8bbe\u8ba1<\/li>\n<\/ul>\n<h3 id=\"vnGzd\">\u8be6\u7ec6\u5207\u6362\u6b65\u9aa4<\/h3>\n<h4 id=\"BLNlN\">1. \u6392\u9664 Tomcat \u4f9d\u8d56<\/h4>\n<p id=\"u35fd6cef\">Maven \u9879\u76ee (pom.xml):<\/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;exclusions&gt;<br \/>\n        &lt;exclusion&gt;<br \/>\n            &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<br \/>\n            &lt;artifactId&gt;spring-boot-starter-tomcat&lt;\/artifactId&gt;<br \/>\n        &lt;\/exclusion&gt;<br \/>\n    &lt;\/exclusions&gt;<br \/>\n&lt;\/dependency&gt;<\/p>\n<p id=\"ub59681a3\">Gradle \u9879\u76ee (build.gradle):<\/p>\n<p>implementation(&#039;org.springframework.boot:spring-boot-starter-web&#039;) {<br \/>\n    exclude group: &#039;org.springframework.boot&#039;, module: &#039;spring-boot-starter-tomcat&#039;<br \/>\n}<\/p>\n<h4 id=\"bdCpO\">2. \u6dfb\u52a0 Undertow \u4f9d\u8d56<\/h4>\n<p id=\"u76a63ee2\">Maven \u9879\u76ee (pom.xml):<\/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-undertow&lt;\/artifactId&gt;<br \/>\n&lt;\/dependency&gt;<\/p>\n<p id=\"u21722c0c\">Gradle \u9879\u76ee (build.gradle):<\/p>\n<p>implementation &#039;org.springframework.boot:spring-boot-starter-undertow&#039;<\/p>\n<h4 id=\"h3zOo\">3. \u5b8c\u6574 Maven \u914d\u7f6e\u793a\u4f8b<\/h4>\n<p>&lt;?xml version&#061;&#034;1.0&#034; encoding&#061;&#034;UTF-8&#034;?&gt;<br \/>\n&lt;project xmlns&#061;&#034;http:\/\/maven.apache.org\/POM\/4.0.0&#034;<br \/>\n         xmlns:xsi&#061;&#034;http:\/\/www.w3.org\/2001\/XMLSchema-instance&#034;<br \/>\n         xsi:schemaLocation&#061;&#034;http:\/\/maven.apache.org\/POM\/4.0.0 http:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd&#034;&gt;<br \/>\n    &lt;modelVersion&gt;4.0.0&lt;\/modelVersion&gt;<\/p>\n<p>    &lt;groupId&gt;com.example&lt;\/groupId&gt;<br \/>\n    &lt;artifactId&gt;demo&lt;\/artifactId&gt;<br \/>\n    &lt;version&gt;0.0.1-SNAPSHOT&lt;\/version&gt;<\/p>\n<p>    &lt;parent&gt;<br \/>\n        &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<br \/>\n        &lt;artifactId&gt;spring-boot-starter-parent&lt;\/artifactId&gt;<br \/>\n        &lt;version&gt;2.5.4&lt;\/version&gt; &lt;!&#8211; \u6216\u4f7f\u7528\u6700\u65b0\u7248\u672c &#8211;&gt;<br \/>\n    &lt;\/parent&gt;<br \/>\n    &lt;properties&gt;<br \/>\n        &lt;java.version&gt;11&lt;\/java.version&gt;<br \/>\n    &lt;\/properties&gt;<br \/>\n    &lt;dependencies&gt;<br \/>\n        &lt;!&#8211; Web starter with Tomcat excluded &#8211;&gt;<br \/>\n        &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;exclusions&gt;<br \/>\n                &lt;exclusion&gt;<br \/>\n                    &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<br \/>\n                    &lt;artifactId&gt;spring-boot-starter-tomcat&lt;\/artifactId&gt;<br \/>\n                &lt;\/exclusion&gt;<br \/>\n            &lt;\/exclusions&gt;<br \/>\n        &lt;\/dependency&gt;<\/p>\n<p>        &lt;!&#8211; Undertow starter &#8211;&gt;<br \/>\n        &lt;dependency&gt;<br \/>\n            &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<br \/>\n            &lt;artifactId&gt;spring-boot-starter-undertow&lt;\/artifactId&gt;<br \/>\n        &lt;\/dependency&gt;<\/p>\n<p>        &lt;!&#8211; Test dependencies &#8211;&gt;<br \/>\n        &lt;dependency&gt;<br \/>\n            &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<br \/>\n            &lt;artifactId&gt;spring-boot-starter-test&lt;\/artifactId&gt;<br \/>\n            &lt;scope&gt;test&lt;\/scope&gt;<br \/>\n        &lt;\/dependency&gt;<br \/>\n    &lt;\/dependencies&gt;<br \/>\n    &lt;build&gt;<br \/>\n        &lt;plugins&gt;<br \/>\n            &lt;plugin&gt;<br \/>\n                &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<br \/>\n                &lt;artifactId&gt;spring-boot-maven-plugin&lt;\/artifactId&gt;<br \/>\n            &lt;\/plugin&gt;<br \/>\n        &lt;\/plugins&gt;<br \/>\n    &lt;\/build&gt;<br \/>\n&lt;\/project&gt;<\/p>\n<h4 id=\"PNXnN\">4. \u81ea\u5b9a\u4e49 Undertow \u914d\u7f6e (\u53ef\u9009)<\/h4>\n<p id=\"uc3d3362e\">\u5728 application.properties \u6216 application.yml \u4e2d\u53ef\u4ee5\u914d\u7f6e Undertow \u53c2\u6570:<\/p>\n<p id=\"uaa4b7333\">application.properties:<\/p>\n<p># \u670d\u52a1\u5668\u7aef\u53e3<br \/>\nserver.port&#061;8080<\/p>\n<p># Undertow \u7279\u5b9a\u914d\u7f6e<br \/>\nserver.undertow.threads.io&#061;16<br \/>\nserver.undertow.threads.worker&#061;256<br \/>\nserver.undertow.buffer-size&#061;1024<br \/>\nserver.undertow.direct-buffers&#061;true<\/p>\n<p id=\"uc412fedb\">application.yml:<\/p>\n<p>server:<br \/>\n  port: 8080<br \/>\n  undertow:<br \/>\n    threads:<br \/>\n      io: 16<br \/>\n      worker: 256<br \/>\n    buffer-size: 1024<br \/>\n    direct-buffers: true<\/p>\n<h4 id=\"IS4Jb\">5. \u9a8c\u8bc1\u5207\u6362\u6210\u529f<\/h4>\n<p id=\"u38d31799\">\u542f\u52a8\u5e94\u7528\u7a0b\u5e8f\u540e&#xff0c;\u5728\u63a7\u5236\u53f0\u65e5\u5fd7\u4e2d\u5e94\u8be5\u80fd\u770b\u5230\u7c7b\u4f3c\u4ee5\u4e0b\u4fe1\u606f&#xff0c;\u8868\u660e Undertow \u5df2\u6210\u529f\u542f\u52a8:<\/p>\n<p id=\"u5890c1e5\">2023-08-11 14:30:00.000 INFO 12345 &#8212; [ main] o.s.b.web.embedded.undertow.Undertow : Undertow started on port(s) 8080 (http)<\/p>\n<p id=\"u936e25f5\">\u800c\u4e0d\u662f Tomcat \u7684\u542f\u52a8\u65e5\u5fd7\u3002<\/p>\n<h3 id=\"A6RiD\">\u5e38\u89c1\u95ee\u9898\u89e3\u51b3<\/h3>\n<li id=\"u00e352b1\">\u7aef\u53e3\u51b2\u7a81:<\/li>\n<ul>\n<li>\n<ul>\n<li id=\"u41e6f320\">\u786e\u4fdd\u6ca1\u6709\u5176\u4ed6\u5e94\u7528\u7a0b\u5e8f\u5360\u7528\u76f8\u540c\u7aef\u53e3<\/li>\n<li id=\"u4b299947\">\u5728 application.properties \u4e2d\u4fee\u6539 server.port<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<li id=\"u5122371b\">\u4f9d\u8d56\u51b2\u7a81:<\/li>\n<ul>\n<li>\n<ul>\n<li id=\"u51ec1a2b\">\u786e\u4fdd\u5b8c\u5168\u6392\u9664\u4e86 Tomcat \u4f9d\u8d56<\/li>\n<li id=\"uf30c8947\">\u4f7f\u7528 mvn dependency:tree \u68c0\u67e5\u4f9d\u8d56\u5173\u7cfb<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<li id=\"u127377ae\">\u6027\u80fd\u8c03\u4f18:<\/li>\n<ul>\n<li>\n<ul>\n<li id=\"u498d242c\">\u6839\u636e\u5e94\u7528\u8d1f\u8f7d\u8c03\u6574\u7ebf\u7a0b\u6c60\u5927\u5c0f<\/li>\n<li id=\"u9427948e\">\u76d1\u63a7\u5e94\u7528\u6027\u80fd\u6307\u6807\u8fdb\u884c\u4f18\u5316<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3 id=\"KzQZy\">\u603b\u7ed3<\/h3>\n<p id=\"u45059054\">\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4&#xff0c;\u4f60\u53ef\u4ee5\u8f7b\u677e\u5c06 Spring Boot \u7684\u9ed8\u8ba4 Servlet \u5bb9\u5668\u4ece Tomcat \u5207\u6362\u5230 Undertow\u3002Undertow \u7279\u522b\u9002\u5408\u9700\u8981\u9ad8\u6027\u80fd\u548c\u4f4e\u5185\u5b58\u5360\u7528\u7684\u5e94\u7528\u573a\u666f\u3002\u5207\u6362\u540e&#xff0c;\u5927\u90e8\u5206 Spring Boot \u7684\u529f\u80fd\u548c\u914d\u7f6e\u65b9\u5f0f\u4fdd\u6301\u4e0d\u53d8&#xff0c;\u786e\u4fdd\u4e86\u826f\u597d\u7684\u5f00\u53d1\u4f53\u9a8c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb22\u6b21\u3002\u5728\u6216# \u670d\u52a1\u5668\u7aef\u53e3# Undertow \u7279\u5b9a\u914d\u7f6eserver:port: 8080undertow:threads:io: 16\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u5c06 Spring Boot \u7684\u9ed8\u8ba4 Servlet \u5bb9\u5668\u4ece Tomcat \u5207\u6362\u5230 Undertow\u3002Undertow \u7279\u522b\u9002\u5408\u9700\u8981\u9ad8\u6027\u80fd\u548c\u4f4e\u5185\u5b58\u5360\u7528\u7684\u5e94\u7528\u573a\u666f\u3002\u5207\u6362\u540e\uff0c\u5927\u90e8\u5206 Spring Boot \u7684\u529f\u80fd\u548c\u914d\u7f6e\u65b9\u5f0f\u4fdd\u6301\u4e0d\u53d8\uff0c\u786e\u4fdd\u4e86\u826f\u597d\u7684\u5f00\u53d1\u4f53\u9a8c\u3002<\/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":[1271,2062],"topic":[],"class_list":["post-53034","post","type-post","status-publish","format-standard","hentry","category-server","tag-springboot","tag-undertow"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SpringBoot\u5207\u6362 Servlet \u5bb9\u5668\u4e3aUndertow - \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\/53034.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SpringBoot\u5207\u6362 Servlet \u5bb9\u5668\u4e3aUndertow - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb22\u6b21\u3002\u5728\u6216# \u670d\u52a1\u5668\u7aef\u53e3# Undertow \u7279\u5b9a\u914d\u7f6eserver:port: 8080undertow:threads:io: 16\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u5c06 Spring Boot \u7684\u9ed8\u8ba4 Servlet \u5bb9\u5668\u4ece Tomcat \u5207\u6362\u5230 Undertow\u3002Undertow \u7279\u522b\u9002\u5408\u9700\u8981\u9ad8\u6027\u80fd\u548c\u4f4e\u5185\u5b58\u5360\u7528\u7684\u5e94\u7528\u573a\u666f\u3002\u5207\u6362\u540e\uff0c\u5927\u90e8\u5206 Spring Boot \u7684\u529f\u80fd\u548c\u914d\u7f6e\u65b9\u5f0f\u4fdd\u6301\u4e0d\u53d8\uff0c\u786e\u4fdd\u4e86\u826f\u597d\u7684\u5f00\u53d1\u4f53\u9a8c\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/53034.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-11T15:04:27+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=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/53034.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/53034.html\",\"name\":\"SpringBoot\u5207\u6362 Servlet \u5bb9\u5668\u4e3aUndertow - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-11T15:04:27+00:00\",\"dateModified\":\"2025-08-11T15:04:27+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/53034.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/53034.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/53034.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SpringBoot\u5207\u6362 Servlet \u5bb9\u5668\u4e3aUndertow\"}]},{\"@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\u5207\u6362 Servlet \u5bb9\u5668\u4e3aUndertow - \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\/53034.html","og_locale":"zh_CN","og_type":"article","og_title":"SpringBoot\u5207\u6362 Servlet \u5bb9\u5668\u4e3aUndertow - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb22\u6b21\u3002\u5728\u6216# \u670d\u52a1\u5668\u7aef\u53e3# Undertow \u7279\u5b9a\u914d\u7f6eserver:port: 8080undertow:threads:io: 16\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u5c06 Spring Boot \u7684\u9ed8\u8ba4 Servlet \u5bb9\u5668\u4ece Tomcat \u5207\u6362\u5230 Undertow\u3002Undertow \u7279\u522b\u9002\u5408\u9700\u8981\u9ad8\u6027\u80fd\u548c\u4f4e\u5185\u5b58\u5360\u7528\u7684\u5e94\u7528\u573a\u666f\u3002\u5207\u6362\u540e\uff0c\u5927\u90e8\u5206 Spring Boot \u7684\u529f\u80fd\u548c\u914d\u7f6e\u65b9\u5f0f\u4fdd\u6301\u4e0d\u53d8\uff0c\u786e\u4fdd\u4e86\u826f\u597d\u7684\u5f00\u53d1\u4f53\u9a8c\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/53034.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-11T15:04:27+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/53034.html","url":"https:\/\/www.wsisp.com\/helps\/53034.html","name":"SpringBoot\u5207\u6362 Servlet \u5bb9\u5668\u4e3aUndertow - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-11T15:04:27+00:00","dateModified":"2025-08-11T15:04:27+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/53034.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/53034.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/53034.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"SpringBoot\u5207\u6362 Servlet \u5bb9\u5668\u4e3aUndertow"}]},{"@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\/53034","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=53034"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/53034\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=53034"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=53034"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=53034"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=53034"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}