Remove the mutable getEmbeddedServletContainers() Map from
EmbeddedWebApplicationContext and instead use the `namespace` to
distinguish the management container.
The ServerPortInfoApplicationContextInitializer class replaces the
previous TestExecutionListener to exposes port properties (by
listening for EmbeddedServletContainerInitializedEvents).
User can now set up default properties in the Environment using
@IntegrationTest("foo:bar", "x:y") etc. Using "server.port:0" you
can get Tomcat or Jetty to spin up on a random port. We also add
a test listener that populates "local.server.port" with the actual
port the server started on so you can @Value("${local.server.port}")
inject it into the test case.
See gh-607 (this should make the extension of that PR to samples
much easier)
There was already a reflection hack in place for logging the local
port in Jetty 8/9. It wasn't being used for the getPort() method
for some reason, so that needed to be fixed.
Fixes gh-635
Since it is not parsing XML it makes no sense to be validating
and it would cause exceptions when importing "namespace"
features. This brings the Boot usage of the bean builder inline
with that in Spring Core.
Fixes gh-630
Rename the RestTemplates to TestRestTemplate to help indicate that it's
primarily intended for testing. Also now extend RestTemplate to allow
direct use, rather than via factory methods.
Fixes gh-599
The problem was that the basic-logback.xml was valid configuration
but not in a <configuration> tag, so it wasn't valid on its own.
This change fixes that.
Fixes gh-585
The static convenience methods in RelaxedPropertyResolver were not
really relaxed, so since they are public (and useful) it makes
more sense to extract them to a utility class.
Introduce an extra `server.tomcat.uri-encoding` property used to
configure the URI encoding for the embedded tomcat container.
Defaults to `UTF-8` instead of the usual tomcat default of `ISO-8859-1`.
Fixes gh-540
When the child is listening for parent closed events
the parent has a reference to the listener which contains the chils.
Thust there is a cycle of references and a GC probalem waiting to
happen.
This change breaks the cycle by making the reference to the
child a WeakReference.
Fixes gh-559
If user sets a ResourceLoader on the SpringApplication, he might
reasonably expect that it would be used to read the config files.
This change ensures that it is (instead of just using the
DefaultResourceLoader).