在实际开发过程中,有时候不能明确知道调用一个接口的参数和响应结果,就可以用下面的方式来处理
import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@FeignClient(value = "xxx", url = "${xxx.url}")
public interface BaseFeign {
@PostMapping("/xxx/xxx/xxx")
JSONObject xxx(@RequestBody JSONObject json);
}
这样就能解决
习惯向左,感觉至上