title: Spring boot Client to invoke REST API secured by OAuth2
body: <p>I am trying to write a client in spring which would invoke a REST api secured by OAuth2.
  I have the following which i can use to get a token from Auth Server and then invoke a resource server.
  Client ID, Client Secret, Username, Password and Access Token URL(URL to fetch the token from) , and Resource URL.
  How do i write a client in spring boot which has above info so i could invoke the resource server URL to fetch my resource or do a POST.
  After i get the access token which would have a Time To Live in ms(TTL), how do i cache it so i do not have to generate the token for every request. Is it good to cache the token ?</p>