1. 首页
  2. 行业
  3. 互联网
  4. springboot调用第三方查询天气.zip

springboot调用第三方查询天气.zip

上传者: 2020-08-22 20:22:52上传 ZIP文件 24.39KB 热度 10次
具体业务逻辑 1.需要cityName 2.需要网址 http://wthrcdn.etouch.cn/weather_mini?city=赣州 3.请求 一般使用httpclient,springboot通过restTemplate 来请求 4.获取请求的body 5.通过ObjectMapper把请求的body转成ResponseResult 6.objectMapper.readValue(待转数据,哪个类.class);
下载地址
用户评论