title: How to specify which resources to protect with Spring Security OAuth2 provider configuration
body: <p>I'm currently implementing a Spring MVC application that is both an OAuth client (in the sense that it consumes data from third party service providers), and an OAuth2 Service Provider (in the sense that it should provide the means for third party oauth clients to consume data from this application from a dedicated REST api). </p>
  
  <p>While I have no issue with the implementation of the application in its capacity as OAuth client, my OAuth2 service provider configuration is interfering with the applications ability to authenticate with service providers- if I enable the Oauth2 config, it appears to intercept callbacks to the application from third party service providers. Disabling it returns the application back to its normal working state.</p>
  
  <p>I'm assuming that this is because I am not specifying which urls I want to the oauth2 provider to govern <strong>exclusively</strong>- but I can't see any way of specifying this. </p>
  
  <p>To simplify the question how do I configure Spring Security OAuth2 provider to manage one url root (e.g. '/restapi/*'), and this url only, with it ignoring all other urls entirely? I've had a look at the <a href="http://static.springsource.org/spring-security/oauth/oauth2.html" rel="nofollow">resources at the projects homepage</a>, but nothing is jumping out at me... </p>
  
  <p>This may well be down to how I've defined my security intercept-urls, in which case it may not be an OAuth2 specific question, but how to apply different security schemes to different url schemes. Any advice on how to do that would be great!</p>