title: Boot, OAuth2, Zuul Proxy and Versions
body: <p>So, i've added in Zuul and to get the proxy working realised i needs to add in 'spring-cloud-security' which i did:</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-security&lt;/artifactId&gt;
          &lt;version&gt;1.1.0.M2&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>The trouble is that as soon as i do this i get this exception</p>
  
  <pre><code>Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'loadBalancedOauth2RestTemplate' defined in class path resource [org/springframework/cloud/security/oauth2/client/  OAuth2LoadBalancerClientAutoConfiguration$LoadBalancedOauth2RestTemplateConfig.class]: Unsatisfied dependency expressed through constructor argument with index 2 of typ[org.springframework.security.oauth2.client.resource.OAuth2ProtectedResourceDetails]: : No qualifying bean of type [org.springframework.security.oauth2.client.resource.OAuth2ProtectedResourceDetails] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.security.oauth2.client.resource.OAuth2ProtectedResourceDetails] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
  at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
  </code></pre>
  
  <p>if i do make a bean i get this exception (i'm specifying the resource server info outside of props/yml):</p>
  
  <pre><code>Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [org.springframework.security.oauth2.client.OAuth2RestTemplate] is defined: expected single matching bean but found 2: userInfoRestTemplate,loadBalancedOauth2RestTemplate
  at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1126) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
  </code></pre>
  
  <p>I've been through this previous post:</p>
  
  <p><a href="https://github.com/spring-cloud/spring-cloud-security/issues/73" rel="nofollow">https://github.com/spring-cloud/spring-cloud-security/issues/73</a></p>
  
  <p>I'm using Spring Boot 1.3.3.RELEASE. I've tried (form the above posting) adding in to dep management:</p>
  
  <pre><code>        &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
              &lt;artifactId&gt;spring-cloud-starter-parent&lt;/artifactId&gt;
              &lt;version&gt;Brixton.M3&lt;/version&gt;
              &lt;type&gt;pom&lt;/type&gt;
              &lt;scope&gt;import&lt;/scope&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>but to no avail.</p>
  
  <p>I expect this is a 'versions' issue; what is the most recent set of libs &amp; versions to use? I've been through the 'oauth2-vanilla-ui' sample in the AngularJS/Security tutorial. Is it because i'm not using props in the resource file?</p>