diff --git a/IX. ‘How-to’ guides/64.12. Configure Undertow.md b/IX. ‘How-to’ guides/64.12. Configure Undertow.md index 1028cdd..a18238c 100644 --- a/IX. ‘How-to’ guides/64.12. Configure Undertow.md +++ b/IX. ‘How-to’ guides/64.12. Configure Undertow.md @@ -1,3 +1,3 @@ -### 64.12. 使用随机未分配的HTTP端口 +### 64.12. 配置Undertow -想扫描一个未使用的端口(为了防止冲突使用OS本地端口)可以使用`server.port=0`。 +通常你可以遵循[Section 63.7, “Discover built-in options for external properties”](http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#howto-discover-build-in-options-for-external-properties)关于`@ConfigurationProperties`(此处主要是ServerProperties和ServerProperties.Undertow),但也要看下`EmbeddedServletContainerCustomizer`。一旦获取到`UndertowEmbeddedServletContainerFactory`,你就可以使用一个`UndertowBuilderCustomizer`修改Undertow的配置以满足你的需求。或更彻底地就是添加你自己的`UndertowEmbeddedServletContainerFactory`。