多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
# 70.15 启用Undertow的多监听器 ### 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; } ```