Commit 735b96dd authored by Andy Wilkinson's avatar Andy Wilkinson

Document how to configure multiple listeners when using Undertow

Closes gh-2191
parent 0688b1b3
...@@ -611,6 +611,7 @@ Example in Gradle: ...@@ -611,6 +611,7 @@ Example in Gradle:
---- ----
[[howto-configure-undertow]] [[howto-configure-undertow]]
=== Configure Undertow === Configure Undertow
Generally you can follow the advice from Generally you can follow the advice from
...@@ -624,7 +625,30 @@ own `UndertowEmbeddedServletContainerFactory`. ...@@ -624,7 +625,30 @@ own `UndertowEmbeddedServletContainerFactory`.
[[howto-use-tomcat-8]] [[howto-enable-multiple-listeners-in-undertow]]
=== Enable Multiple Listeners with Undertow
Add an `UndertowBuilderCustomizer` to the `UndertowEmbeddedServletContainerFactory` and
add a listener to the `Builder`:
[source,java,indent=0,subs="verbatim,quotes,attributes"]
----
@Bean
public UndertowEmbeddedServletContainerFactory embeddedServletContainerFactory() {
UndertowEmbeddedServletContainerFactory factory = new UndertowEmbeddedServletContainerFactory();
factory.addBuilderCustomizers(new UndertowBuilderCustomizer() {
@Override
public void customize(Builder builder) {
builder.addHttpListener(8080, "0.0.0.0");
}
});
return factory;
}
----
[[howto-use-tomcat-7]] [[howto-use-tomcat-7]]
=== Use Tomcat 7 === Use Tomcat 7
Tomcat 7 works with Spring Boot, but the default is to use Tomcat 8. If you cannot use Tomcat 7 works with Spring Boot, but the default is to use Tomcat 8. If you cannot use
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment