更新时间:2023-09-17 08:31:40
TomcatConnectorCustomizer
仅修改现有的 Connector
(名称中的线索).要添加其他连接器,您只需要一个不同的 API(例如 这里),例如(从样本中复制):
A TomcatConnectorCustomizer
only modifies the existing Connector
(clue in the name). To add additional connectors you just need a different API (example here), e.g. (copied from the sample):
@Bean
public EmbeddedServletContainerFactory servletContainer() {
TomcatEmbeddedServletContainerFactory tomcat = new TomcatEmbeddedServletContainerFactory();
tomcat.addAdditionalTomcatConnectors(createConnector());
return tomcat;
}