diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfiguration.java index a1fe46c5d7..27a74dccf1 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfiguration.java @@ -21,6 +21,7 @@ import javax.servlet.Servlet; import org.apache.catalina.startup.Tomcat; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.util.Loader; +import org.eclipse.jetty.webapp.WebAppContext; import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryAware; @@ -82,7 +83,7 @@ public class EmbeddedServletContainerAutoConfiguration { * Nested configuration if Jetty is being used. */ @Configuration - @ConditionalOnClass({ Servlet.class, Server.class, Loader.class }) + @ConditionalOnClass({ Servlet.class, Server.class, Loader.class, WebAppContext.class }) @ConditionalOnMissingBean(value = EmbeddedServletContainerFactory.class, search = SearchStrategy.CURRENT) public static class EmbeddedJetty {