Spring-boot: Document adding multiple connectors for Jetty and Undertow

Created on 14 Jun 2019  路  4Comments  路  Source: spring-projects/spring-boot

It's possible to add additional connectors on TomcatServletWebServerFactory. We should make that consistent unless there was a specific reason for not doing so on the reactive side.

Related #528.

documentation

Most helpful comment

oh yeah, you're right. Wonder if we should change this section of the doc to use the customizer then?

All 4 comments

For Jetty and Undertow this can be done with a JettyServerCustomizer and UndertowBuilderCustomizer respectively. We can use this issue to add support for Tomcat and document how to configure multiple connectors for all three.

The experience with Tomcat vs Jetty/Undertow is slightly inconsistent. With Tomcat you need to use the addAdditionalConnectors method. I don't think there's a way to add a connector without creating a new WebServerFactory. With Jetty and Undertow it's possible to do so via customizers.

We should try and make them all consistent.

I don't think there's a way to add a connector without creating a new WebServerFactory.

It still wouldn't quite be consistent, but can't you use a WebServerFactoryCustomizer to avoid needing to create the factory?

oh yeah, you're right. Wonder if we should change this section of the doc to use the customizer then?

Was this page helpful?
0 / 5 - 0 ratings