When FailureAnalyzers, a SpringBootExceptionReporter, is created, the environment prepared by SpringApplication hasn't been set on the application context. This results in any EnvironmentAware FailureAnalyzer having the context's default environment injected rather than the environment that will be in place when the context is refreshed.