Reproducer for Spring Boot WebApplicationContextUtils.getWebApplicationContext issue spring-projects/spring-boot#4370 Prerequisites Java 8 Run Run with ./gradlew test ReproTemplateIntegrationTest fails, WorkaroundTemplateIntegrationTest passes.