当前位置:网站首页>Use of openfeign components

Use of openfeign components

2022-04-23 22:10:00 Leon_ Jinhai_ Sun

reflection : Use RestTemplate+ribbon The end-to-end call can be completed , Why even use feign?

String restTemplateForObject = restTemplate.getForObject("http:// service name /url? Parameters " + name, String.class);
#  Existing problems :
- 1. You need to write this code every time you call the service , There's a lot of code redundancy 
- 2. If the service address is modified , Higher maintenance costs 
- 3. Not flexible enough to use 

版权声明
本文为[Leon_ Jinhai_ Sun]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/113/202204232157393580.html