OpenFeign的使用
//定义接口
@FeignClient(value = "feignservicename")
public interface JobServiceFeignClient {
@RequestMapping("/product/toredis")
public boolean jobs();
}
//调用
@Autowired
private JobServiceFeignClient service;
service.jobs();
OpenFeign的使用
//定义接口
@FeignClient(value = "feignservicename")
public interface JobServiceFeignClient {
@RequestMapping("/product/toredis")
public boolean jobs();
}
//调用
@Autowired
private JobServiceFeignClient service;
service.jobs();
还不快抢沙发