70.15 启用Undertow的多监听器

UndertowBuilderCustomizer添加到UndertowEmbeddedServletContainerFactory,然后使用Builder添加一个listener:

@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;
}
powered by Gitbook该页面构建时间: 2017-08-01 08:30:17

results matching ""

    No results matching ""