OAuth2RestTemplate with Ribbon + Eureka
问题 I am working on microservices with Spring Cloud and Netflix OSS Eureka and Ribbon. I have another service running as oauth-server which provides OAuth2 token. All my microservices are registered with Eureka including oauth-server. My whole solution works if I use hardcoded url of oauth-server as "clientCredentialsResourceDetails.setAccessTokenUri("http://localhost:9000/oauth/token");" but when I try to use Eureka Discovered url of oauth-server like "clientCredentialsResourceDetails