title: Failed to process import candidates for configuration class spring cloud gateway
body: <p>.   ____          _            __ _ _
  /\ / <em><em><em>'</em> __ _ <em>(</em>)</em> __  __ _ \ \ \ <br />
  ( ( )_</em>_ | '_ | '<em>| | '</em> / <em>` | \ \ \ <br />
  \/  __<em>)| |</em>)| | | | | || (</em>| |  ) ) ) )
  '  |<strong><em><em>| .__|</em>| |</em>|<em>| |</em>_<em>, | / / / /
  =========|</em>|==============|</strong><em>/=/</em>/<em>/</em>/
  :: Spring Boot ::                (v2.4.1)</p>
  <p>2021-01-13 10:43:21.414  INFO 17304 --- [           main] c.s.c.gateway.CloudGatewayApplication    : Starting CloudGatewayApplication using Java 1.8.0_271 on Ajinas with PID 17304 (D:\microservice\cloud-gateway\target\classes started by user in D:\microservice\cloud-gateway)
  2021-01-13 10:43:21.421  INFO 17304 --- [           main] c.s.c.gateway.CloudGatewayApplication    : No active profile set, falling back to default profiles: default
  2021-01-13 10:43:22.659  WARN 17304 --- [           main] o.s.boot.actuate.endpoint.EndpointId     : Endpoint ID 'hystrix.stream' contains invalid characters, please migrate to a valid format.
  2021-01-13 10:43:23.161  WARN 17304 --- [           main] onfigReactiveWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.study.cloud.gateway.CloudGatewayApplication]; nested exception is java.io.FileNotFoundException: class path resource [org/springframework/boot/autoconfigure/web/ServerPropertiesAutoConfiguration.class] cannot be opened because it does not exist
  2021-01-13 10:43:23.198  INFO 17304 --- [           main] ConditionEvaluationReportLoggingListener :</p>
  <p>Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
  2021-01-13 10:43:23.261 ERROR 17304 --- [           main] o.s.boot.SpringApplication               : Application run failed</p>
  <p>org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.study.cloud.gateway.CloudGatewayApplication]; nested exception is java.io.FileNotFoundException: class path resource [org/springframework/boot/autoconfigure/web/ServerPropertiesAutoConfiguration.class] cannot be opened because it does not exist
  at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:610) ~[spring-context-5.3.2.jar:5.3.2]
  at org.springframework.context.annotation.ConfigurationClassParser.access$800(ConfigurationClassParser.java:111) ~[spring-context-5.3.2.jar:5.3.2]
  at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.lambda$processGroupImports$1(ConfigurationClassParser.java:812) ~[spring-context-5.3.2.jar:5.3.2]
  at java.util.ArrayList.forEach(Unknown Source) ~[na:1.8.0_271]
  at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.processGroupImports(ConfigurationClassParser.java:809) ~[spring-context-5.3.2.jar:5.3.2]
  at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorHandler.process(ConfigurationClassParser.java:780) ~[spring-context-5.3.2.jar:5.3.2]
  at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:193) ~[spring-context-5.3.2.jar:5.3.2]
  at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:336) ~[spring-context-5.3.2.jar:5.3.2]
  at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:252) ~[spring-context-5.3.2.jar:5.3.2]
  at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:285) ~[spring-context-5.3.2.jar:5.3.2]
  at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:99) ~[spring-context-5.3.2.jar:5.3.2]
  at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:751) ~[spring-context-5.3.2.jar:5.3.2]
  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:569) ~[spring-context-5.3.2.jar:5.3.2]
  at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:63) ~[spring-boot-2.4.1.jar:2.4.1]
  at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767) [spring-boot-2.4.1.jar:2.4.1]
  at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.4.1.jar:2.4.1]
  at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426) [spring-boot-2.4.1.jar:2.4.1]
  at org.springframework.boot.SpringApplication.run(SpringApplication.java:326) [spring-boot-2.4.1.jar:2.4.1]
  at org.springframework.boot.SpringApplication.run(SpringApplication.java:1309) [spring-boot-2.4.1.jar:2.4.1]
  at org.springframework.boot.SpringApplication.run(SpringApplication.java:1298) [spring-boot-2.4.1.jar:2.4.1]
  at com.study.cloud.gateway.CloudGatewayApplication.main(CloudGatewayApplication.java:14) [classes/:na]
  Caused by: java.io.FileNotFoundException: class path resource [org/springframework/boot/autoconfigure/web/ServerPropertiesAutoConfiguration.class] cannot be opened because it does not exist
  at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180) ~[spring-core-5.3.2.jar:5.3.2]
  at org.springframework.core.type.classreading.SimpleMetadataReader.getClassReader(SimpleMetadataReader.java:55) ~[spring-core-5.3.2.jar:5.3.2]
  at org.springframework.core.type.classreading.SimpleMetadataReader.(SimpleMetadataReader.java:49) ~[spring-core-5.3.2.jar:5.3.2]
  at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103) ~[spring-core-5.3.2.jar:5.3.2]
  at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.createMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:86) ~[spring-boot-2.4.1.jar:2.4.1]
  at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.getMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:73) ~[spring-boot-2.4.1.jar:2.4.1]
  at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:81) ~[spring-core-5.3.2.jar:5.3.2]
  at org.springframework.context.annotation.ConfigurationClassParser.asSourceClass(ConfigurationClassParser.java:696) ~[spring-context-5.3.2.jar:5.3.2]
  at org.springframework.context.annotation.ConfigurationClassParser$SourceClass.getRelated(ConfigurationClassParser.java:1090) ~[spring-context-5.3.2.jar:5.3.2]
  at org.springframework.context.annotation.ConfigurationClassParser$SourceClass.getAnnotationAttributes(ConfigurationClassParser.java:1071) ~[spring-context-5.3.2.jar:5.3.2]
  at org.springframework.context.annotation.ConfigurationClassParser.collectImports(ConfigurationClassParser.java:549) ~[spring-context-5.3.2.jar:5.3.2]
  at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:522) ~[spring-context-5.3.2.jar:5.3.2]
  at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:311) ~[spring-context-5.3.2.jar:5.3.2]
  at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:250) ~[spring-context-5.3.2.jar:5.3.2]
  at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:600) ~[spring-context-5.3.2.jar:5.3.2]
  ... 20 common frames omitted`package com.study.cloud.gateway;</p>
  <pre><code>import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
  import org.springframework.cloud.netflix.hystrix.EnableHystrix;
  
  @SpringBootApplication
  @EnableEurekaClient
  @EnableHystrix
  public class CloudGatewayApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(CloudGatewayApplication.class, args);
      }
  
  }
  </code></pre>
   <br>
  <pre><code>spring:
    application:
      name: GATEWAY-SERVICE
    cloud:
      gateway:
        routes:
        - id: order-service
          uri: lb://ORDER-SERVICE
          predicates:
          - Path=/order/**
          filters:
          - name: Circuit-Breaker
            args:
              name: order-service
              fallbackuri: forward:/orderFallBack 
        - id: payment-service
          uri: lb://PAYMENT-SERVICE
          predicates:
          - Path=/payment/**
          filters:
          - name: Circuit-Breaker
            args:
              name: payment-service
              fallbackuri: forward:/orderFallBack
  eureka:
    client:
      register-with-eureka: true
      fetch-registry: true
      service-url:
        defaultZone: http://localhost:8761/eureka/
    instance:
      hostname: localhost
      
  server:
    port: 8989
    
  management:
    endpoints:
      web:
        exposure:
          include: hystrix.stream
  
  hystrix:
    command: 
      fallbackcmd:
        execution:
          isolation:
            thread:
              timeoutInMilliseconds: 5000
  </code></pre>
  <br>
  
  <p>
  4.0.0
  
  org.springframework.boot
  spring-boot-starter-parent
  2.4.1
   
  
  com.study
  cloud-gateway
  0.0.1-SNAPSHOT
  cloud-gateway
  Demo project for Spring Boot microservices</p>
  <pre><code>&lt;properties&gt;
      &lt;java.version&gt;1.8&lt;/java.version&gt;
      &lt;spring-cloud.version&gt;2020.0.0&lt;/spring-cloud.version&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-starter-config&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-starter-gateway&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-hystrix --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-starter-hystrix&lt;/artifactId&gt;
          &lt;version&gt;1.4.7.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-starter-netflix-eureka-client&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;dependencyManagement&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-dependencies&lt;/artifactId&gt;
              &lt;version&gt;${spring-cloud.version}&lt;/version&gt;
              &lt;type&gt;pom&lt;/type&gt;
              &lt;scope&gt;import&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/dependencyManagement&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  
  &lt;repositories&gt;
      &lt;repository&gt;
          &lt;id&gt;spring-milestones&lt;/id&gt;
          &lt;name&gt;Spring Milestones&lt;/name&gt;
          &lt;url&gt;https://repo.spring.io/milestone&lt;/url&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  </code></pre>