文章目录
服务调用Feign入门
前面我们使用的RestTemplate
实现REST API调用,代码大致如下:
@GetMapping("/buy/{id}")
public Product findById(@PathVariable Long id) {
//通过restTemplate调用
前面我们使用的RestTemplate
实现REST API调用,代码大致如下:
@GetMapping("/buy/{id}")
public Product findById(@PathVariable Long id) {
//通过restTemplate调用