title: Spring Cloud Gateway error on TokenRelayGatewayFilterFactory
body: <p>I'm getting the following error when running my Spring Cloud Gateway. The corresponding yml file and my dependencies are given below</p>
  
  <pre><code>    Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
  2020-04-04 18:28:56.698 ERROR 6944 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 
  
  ***************************
  APPLICATION FAILED TO START
  ***************************
  
  Description:
  
  Parameter 0 of method tokenRelayGatewayFilterFactory in org.springframework.cloud.security.oauth2.gateway.TokenRelayAutoConfiguration required a bean of type 'org.springframework.security.oauth2.client.web.server.ServerOAuth2AuthorizedClientRepository' that could not be found.
  
  The following candidates were found but could not be injected:
      - Bean method 'authorizedClientRepository' in 'ReactiveOAuth2ClientConfigurations.ReactiveOAuth2ClientConfiguration' not loaded because @ConditionalOnBean (types: org.springframework.security.oauth2.client.registration.ReactiveClientRegistrationRepository; SearchStrategy: all) did not find any beans of type org.springframework.security.oauth2.client.registration.ReactiveClientRegistrationRepository
  
  
  Action:
  
  Consider revisiting the entries above or defining a bean of type 'org.springframework.security.oauth2.client.web.server.ServerOAuth2AuthorizedClientRepository' in your configuration.
  
  
  Process finished with exit code 0
  </code></pre>
  
  <p>Dependencies:</p>
  
  <pre><code>   &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-gateway&lt;/artifactId&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-security&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-oauth2-client&lt;/artifactId&gt;
          &lt;version&gt;2.2.6.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-security --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-starter-security&lt;/artifactId&gt;
          &lt;version&gt;1.0.0.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>The yml that I'm trying to use is given below. I use OAuth2.0 and therefore I have a tokenrelay</p>
  
  <pre><code>&gt;    application:
  &gt;     name: gateway   cloud:
  &gt;     gateway:
  &gt;       routes:
  &gt;         - id: jobpostingModule
  &gt;           uri: http://localhost:6084/
  &gt;           predicates:
  &gt;             - Path=/api/jobpostings/**
  &gt;           filters:
  &gt;             - TokenRelay=
  &gt;           sensitiveHeaders:
  </code></pre>