From 82b839e4fb0a4c221de25c4eebff542a10286785 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Thu, 16 Mar 2017 14:40:30 -0700 Subject: [PATCH] Polish OnWebApplicationCondition message --- .../autoconfigure/condition/OnWebApplicationCondition.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnWebApplicationCondition.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnWebApplicationCondition.java index 7ed14e75cc..af98818e56 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnWebApplicationCondition.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnWebApplicationCondition.java @@ -27,8 +27,8 @@ import org.springframework.core.annotation.Order; import org.springframework.core.type.AnnotatedTypeMetadata; import org.springframework.util.ClassUtils; import org.springframework.util.ObjectUtils; +import org.springframework.web.context.ConfigurableWebEnvironment; import org.springframework.web.context.WebApplicationContext; -import org.springframework.web.context.support.StandardServletEnvironment; /** * {@link Condition} that checks for the presence or absence of @@ -102,9 +102,9 @@ class OnWebApplicationCondition extends SpringBootCondition { return ConditionOutcome.match(message.foundExactly("'session' scope")); } } - if (context.getEnvironment() instanceof StandardServletEnvironment) { + if (context.getEnvironment() instanceof ConfigurableWebEnvironment) { return ConditionOutcome - .match(message.foundExactly("StandardServletEnvironment")); + .match(message.foundExactly("ConfigurableWebEnvironment")); } if (context.getResourceLoader() instanceof WebApplicationContext) { return ConditionOutcome.match(message.foundExactly("WebApplicationContext"));