先注册RestTemplate
@MapperScan("cn.itcast.order.mapper")@SpringBootApplicationpublic class OrderApplication {public static void main(String[] args) {SpringApplication.run(OrderApplication.class, args);}@Beanpublic RestTemplate restTemplate() {return new RestTemplate();}}
再使用RestTemplate对象通过Restful风格访问其他微服务接口调用数据

