title: @PreAuthorize not working with oauth2 external server
body: <p>I have created separate spring boot oAuth2 separate server and using to secure in the separate REST API project by using the below configuration. Everything is working fine except this TAG  @PreAuthorize(&quot;hasAuthority('USER')&quot;). It not working</p>
  <p><strong>YML Configuration:</strong>
  security:
  oauth2:
  resource:
  token-info-uri: <a href="http://127.0.0.1:9191/oauth/check_token" rel="nofollow noreferrer">http://127.0.0.1:9191/oauth/check_token</a></p>
  <p><a href="https://i.stack.imgur.com/hkLx4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hkLx4.png" alt="enter image description here" /></a></p>
  <p><strong>Controller:</strong></p>
  <p>Note: I also tried with @PreAuthorize(&quot;hasRole('USER')&quot;) but nothing happened.
  <a href="https://i.stack.imgur.com/EPZSD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EPZSD.png" alt="enter image description here" /></a></p>
  <p><strong>AuthorizationServerConfigurer:</strong>
  <a href="https://i.stack.imgur.com/Tn5SS.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Tn5SS.jpg" alt="enter image description here" /></a></p>