This change allows customizers to be applied to additional connectors in subclasses of TomcatServletWebServerFactory.

Example:

@Bean
public TomcatServletWebServerFactory servletWebServerFactory() {
    return new TomcatServletWebServerFactory() {
        @Override
        public WebServer getWebServer(ServletContextInitializer... initializers) {
            getAdditionalTomcatConnectors().forEach(this::customizeConnector);
            return super.getWebServer(initializers);
        }
    };
}

Comment From: pivotal-cla

@wkuranowski Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@wkuranowski Thank you for signing the Contributor License Agreement!

Comment From: wilkinsona

Thanks for the suggestion. Unfortunately, I don't think we can make this change as it will break existing applications that are relying on the current behavior. I would recommend that you call customizeConnector(connector) and then, if you want it to use a custom port, call connector.setPort(…).