Clarify doc

Closes gh-3858
This commit is contained in:
Stephane Nicoll 2015-09-08 14:04:39 +02:00
parent 03302667d9
commit ac582709e7
1 changed files with 6 additions and 3 deletions

View File

@ -420,9 +420,6 @@ code.
=== Use a random unassigned HTTP port
To scan for a free port (using OS natives to prevent clashes) use `server.port=0`.
TIP: You can know what port got allocated at runtime by looking at the `local.server.port`
property in the `Environment`.
[[howto-discover-the-http-port-at-runtime]]
@ -454,6 +451,12 @@ and then inject the actual ('`local`') port as a `@Value`. For example:
}
----
[NOTE]
====
Don't try to inject the port with `@Value` in a regular application. As we just saw, the
value is only set once the container has initialized; contrary to a test, application code
callbacks are processed early (i.e. before the value is actually available).
====
[[howto-configure-ssl]]