记录Springboot发起http post请求接收JSON实现
记录下springboot 接收接口实现。
用到的基本都是APACHE原来用的 HttpClient 发起的post请求,在SpringBoot中已经算是比较老的方式,比较繁琐,需要构建多个http相关类型来相互调用。
现在SpringBoot中Spring 推荐 RestTemplate来发起post请求。
String url=url;//调用的接口地址
String name = Student.getName().toString;
String sex = Student.getSex().toS
原创
2021-04-02 16:13:53 ·
1727 阅读 ·
0 评论