title: Error creating bean with name 'documentationPluginsBootstrapper' with springboot
body: <p>I am building springboot application but while launching the application it throws following exception.
  I am configuring ServletContext through ServletContextInitializer bean. 
  Any help or input will be appreciated.</p>
  
  <pre><code>org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'documentationPluginsBootstrapper' defined in URL [..!/BOOT-INF/lib/springfox-spring-web-2.6.1.jar!/springfox/documentation/spring/web/plugins/DocumentationPluginsBootstrapper.class]: Unsatisfied dependency expressed through constructor parameter 6; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.servlet.ServletContext' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
      at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749)
      at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1154)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1056)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
      at org.springframework.web.filter.DelegatingFilterProxy.findWebApplicationContext(DelegatingFilterProxy.java:297)
      at org.springframework.web.filter.DelegatingFilterProxy.initFilterBean(DelegatingFilterProxy.java:233)
      at org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:199)
      at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
      at org.apache.catalina.core.ApplicationFilterConfig.&lt;init&gt;(ApplicationFilterConfig.java:109)
      at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4572)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5215)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'javax.servlet.ServletContext' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1474)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1102)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
      at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)
      at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
      ... 26 more
  </code></pre>
  
  <p>below is gradle dependency. I hope it will help.</p>
  
  <pre><code>compile(
                  "javax.validation:validation-api:1.1.0.Final",
                  "org.hibernate:hibernate-validator:5.1.0.Final",
                  "org.glassfish.web:el-impl:2.2",
  
                  'org.bouncycastle:bcprov-jdk15on:1.51',
                  'ibmjceprovider:ibmjceprovider:ibmjceprovider',
                  'com.google.guava:guava:18.0'
          )
          compile('com.googlecode.lambdaj:lambdaj:2.3.3') {
              exclude group: 'org.hamcrest', module: 'hamcrest-all'
          } 
         compile('io.springfox:springfox-swagger2:2.4.0')
          compile('io.springfox:springfox-swagger-ui:2.4.0')
          compile 'io.jsonwebtoken:jjwt:0.7.0'
          runtime(
                  'org.apache.httpcomponents:httpasyncclient:4.0.2'
          )
         configurations {
          all*.exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
          all*.exclude group: 'org.springframework', module: 'spring-orm'
          all*.exclude group: 'org.springframework.messaging', module: 'spring-messaging'
          all*.resolutionStrategy {
              force 'com.jayway.jsonpath:json-path:1.1.0'
          }
         compile(           
                  'com.netflix.hystrix:hystrix-metrics-event-stream:1.4.10',
                  'org.springframework.boot:spring-boot-starter-web'
          )
          testCompile('org.springframework.boot:spring-boot-starter-test')
  </code></pre>