@Configuration(proxyBeanMethods = 偽) @ConditionalOnWebApplication @EnableConfigurationProperties(ServerProperties。クラス) パブリック クラスEmbeddedWebServerFactoryCustomizerAutoConfiguration { / ** *如果容器中有Tomcat.class就使用Tomcatの容器 * / @Configuration(proxyBeanMethods = 偽) @ConditionalOnClass({にTomcat。クラス、UpgradeProtocol。クラス}) パブリック 静的 クラスTomcatWebServerFactoryCustomizerConfiguration { @Bean 公衆TomcatWebServerFactoryCustomizer tomcatWebServerFactoryCustomizer(環境環境、 ServerProperties serverProperties){ リターン 新しいTomcatWebServerFactoryCustomizer(環境、serverProperties)。 } } / ** *如果容器中有桟橋 * / @Configuration(proxyBeanMethods = 偽) @ConditionalOnClass({サーバー。クラス、ローダ。クラス、WebAppContext。クラス}) パブリック 静的 クラスJettyWebServerFactoryCustomizerConfiguration { @Bean 公衆JettyWebServerFactoryCustomizer jettyWebServerFactoryCustomizer(環境環境、 ServerProperties serverProperties){ リターン 新しいJettyWebServerFactoryCustomizer(環境、serverProperties)。 } } / ** *如果容器中有アンダートウ就加载アンダートウ * / @Configuration(proxyBeanMethods = 偽) @ConditionalOnClass({アンダートウ。クラス、SslClientAuthMode。クラス}) パブリック 静的 クラスUndertowWebServerFactoryCustomizerConfiguration { @Bean 公衆UndertowWebServerFactoryCustomizer undertowWebServerFactoryCustomizer(環境環境、 ServerProperties serverProperties){ リターン 新しいUndertowWebServerFactoryCustomizer(環境、serverProperties)。 } } / ** *ネッティーが使用されている場合はネストされた構成。 * / @Configuration(proxyBeanMethods = 偽) @ConditionalOnClass(HttpServerを。クラス) パブリック 静的 クラスNettyWebServerFactoryCustomizerConfiguration { @Bean 公衆NettyWebServerFactoryCustomizer nettyWebServerFactoryCustomizer(環境環境、 ServerProperties serverProperties){ リターン 新しいNettyWebServerFactoryCustomizer(環境、serverProperties)。 } } }
springbootウェブモジュールの既定の依存tomca、他の依存の導入を組み込みのサーブレットを変更および削除Tomcatにそれに依存しています