springboot支持三种嵌入式servlet容器:tomcat(默认),jetty,undertow

默认是使用tomcat容器的:

springboot支持三种嵌入式servlet容器:tomcat(默认),jetty,undertow

web模块排除tomcat依赖:

springboot支持三种嵌入式servlet容器:tomcat(默认),jetty,undertow

引入jetty容器:

springboot支持三种嵌入式servlet容器:tomcat(默认),jetty,undertow

启动项目看日志(已经成功切换到jetty):

springboot支持三种嵌入式servlet容器:tomcat(默认),jetty,undertow

关键是,与tomcat保持一样的配置(一样的配方,不一样的味道):

springboot支持三种嵌入式servlet容器:tomcat(默认),jetty,undertow

再整体来看一下:

springboot支持三种嵌入式servlet容器:tomcat(默认),jetty,undertow

再比如,切换成undertow容器:

springboot支持三种嵌入式servlet容器:tomcat(默认),jetty,undertow

springboot支持三种嵌入式servlet容器:tomcat(默认),jetty,undertow

看日志,已经成功切换到undertow了:

springboot支持三种嵌入式servlet容器:tomcat(默认),jetty,undertow

相关文章:

  • 2021-12-18
  • 2021-12-22
  • 2021-06-28
  • 2021-06-12
  • 2021-11-03
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2021-12-13
  • 2021-04-15
相关资源
相似解决方案