当前位置:网站首页>微服务远程调用
微服务远程调用
2022-07-29 06:30:00 【其然乐衣】


步骤 1:注册RestTemplate
在order-service的OrderApplication中注册RestTemplate

@SpringBootApplication
public class SquareApplication {
public static void main(String[] args) {
SpringApplication.run(SquareApplication.class,args);
}
/**
* 创建RestTemplate 并注入Spring容器
* @return
*/
@Bean
public RestTemplate restTemplate(){
return new RestTemplate();
}
}
边栏推荐
猜你喜欢
随机推荐
Nodejs安装教程
Record - step on the pit - real-time data warehouse development - doris/pg/flink
怎么会不喜欢呢,CICD中轻松发送邮件
最新百亿量化私募名单
20-40K| 梅卡曼德3D视觉算法/软件/产品经理招聘
MVFuseNet:Improving End-to-End Object Detection and Motion Forecasting through Multi-View Fusion of
gin 中间件
网上传说软件测试培训真的那么黑心吗?都是骗局?
接口测试实战项目03:执行测试用例
ETL为什么经常变成ELT甚至LET?
Problems encountered in vmware16 installing virtual machines
模拟卷Leetcode【普通】172. 阶乘后的零
基于C语言实现图书借阅管理系统
模拟卷Leetcode【普通】081. 搜索旋转排序数组 II
Thread - thread safety - thread optimization
MySQL 高级(进阶) SQL 语句 (一)
Thread synchronization - producers and consumers, tortoise and rabbit race, dual thread printing
WPF嵌套布局案例
Cvpr2022oral special series (I): low light enhancement
Vscode remote debugging PHP solution through remotessh and Xdebug









