Skip to content

Commit

Permalink
Revise docs for port discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Syer committed Dec 27, 2013
1 parent cdb45cf commit 4d60b09
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/howto.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4d60b09

Please sign in to comment.