@Bean注册一个RestTemplate:
调用服务:
因为要参与网络传输,所以要实现序列化接口:
Spring RestTemplate的使用示例
原文:https://www.cnblogs.com/niwotaxuexiba/p/10853066.html