企业网站如何制作,空间平面的网页设计素材,网站如何知道是谁做的呢,网站性能容量的收集与分析怎么做Servlet容器自动配置类为ServletWebServerFactoryAutoConfiguration 可以看到通过Import注解导入了三个配置类#xff1a; 通过这个这三个配置类可以看出#xff0c;它们都使用了ConditionalOnClass注解#xff0c;当类路径存在tomcat相关的类时#xff0c;会配置一个T…Servlet容器自动配置类为ServletWebServerFactoryAutoConfiguration 可以看到通过Import注解导入了三个配置类 通过这个这三个配置类可以看出它们都使用了ConditionalOnClass注解当类路径存在tomcat相关的类时会配置一个TomcatServletWebServerFactory类型的bean, 当类路径存在jetty相关的类时会配置一个JettyServletWebServerFactory 类型的bean, 当类路径存在undertow相关的类时会配置一个UndertowServletWebServerFactory类型的bean。 这样就完成了根据pom.xml中引入了不同的依赖来决定使用哪种Servlet容器。 dependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-tomcat/artifactId/dependencydependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-undertow/artifactId/dependencydependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-jetty/artifactId/dependency