This example shows how to use spring oauth2 to secure resource servers, for example in spring cloud microservices.
Just
$ gradle build
and start both spring boot application using
$ gradle bootRun
inside the directories.
Read my article for detailed explanation.