Provide seamless support for local.server.port
Previously, the actual HTTP port on which a web application is running on was only exposed in tests. This commit makes sure to provide that feature regardless of the environment so that applications can know on which port they are actually running on. If there are several containers, each is exposed via the namespace of their respective application context. Closes gh-3259
This commit is contained in:
@@ -400,6 +400,9 @@ 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]]
|
||||
|
||||
Reference in New Issue
Block a user