OAuth2RestTemplate的例子

@RestController
public class RoutesController {
    @Autowired
    private OAuth2RestTemplate restTemplate;

    @RequestMapping(value = "/routes")
    @Qualifier("userInfoRestTemplate")
    public ResponseEntity getRoutes() {
        return restTemplate.getForEntity("http://zuul-server/routes", String.class);
    }
}

转载于:https://my.oschina.net/u/2266730/blog/804740

你可能感兴趣的:(OAuth2RestTemplate的例子)