Update 64.12. Configure Undertow.md

master
qibaoguang 2015-03-25 22:36:38 +08:00
parent 4de9a2415d
commit 10ec84b5f9
1 changed files with 2 additions and 2 deletions

View File

@ -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`。