Merge branch '2.0.x'

This commit is contained in:
Madhura Bhave
2018-09-17 14:30:38 -07:00
7 changed files with 95 additions and 18 deletions

View File

@@ -8058,6 +8058,23 @@ example:
include::{test-examples}/autoconfigure/UserServiceAutoConfigurationTests.java[tag=test-env]
----
The runner can also be used to display the `ConditionEvaluationReport`. The report can be printed
at `INFO` or `DEBUG` level. The following example shows how to use the `ConditionEvaluationReportLoggingListener`
to print the report in auto-configuration tests.
[source,java,indent=0]
----
@Test
public void autoConfigTest {
ConditionEvaluationReportLoggingListener initializer = new ConditionEvaluationReportLoggingListener(
LogLevel.INFO);
ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withInitializer(initializer).run((context -> {
// Do something...
}));
}
----
==== Simulating a Web Context