Commit 4d60b09c authored by Dave Syer's avatar Dave Syer

Revise docs for port discovery

parent cdb45cff
......@@ -440,8 +440,10 @@ To scan for a free port (using OS natives to prevent clashes) use
You can access the port the server is running on from log output or
from the `EmbeddedWebApplicationContext` via its
`EmbeddedServletContainer` (you can `@Autowired` an
`ApplicationContext` and downcast it to obtain the specific type).
`EmbeddedServletContainer`. The best way to get that and be sure that
it has initialized is to add a `@Bean` of type
`ApplicationListener<EmbeddedServletContainerInitializedEvent>` and
pull the container out of the event wehen it is published.
## Change the HTTP Port or Address of the Actuator Endpoints
......
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