需要添加下Gson和lombok的maven的依赖
//拉取天气信息
private static WeatherReportInfo getTodayWeather(String cityName)
throws IOException {
// 连接和风天气的API
String url1= "https://free-api.heweather.net/s6/weather/now?location="+cityName+"&key=3c3fa198cacc4152b94b20def11b2455";
URL url = new URL(url1);
URLConnection connectionData = url.openConnection();
connectionData.setConnectTimeout(1000);
BufferedReader br = null;
try {
br = new BufferedReader(new InputStreamReader(
connectionData.getInputStream(