问答详情
源自:5-3 格式化输出天气预报结果

Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: ognl.OgnlException: source is null for getProperty(null, "showapi_res_body") at com.imooc.weather.impl.WeatherUtilsImpl.w24h(WeatherUtilsImpl.java:82) at Application.main

有人碰到我这种情形吗,无法获取天气

http://img2.mukewang.com/6214aafd00019ed318130573.jpg

提问者:慕粉1927057669 2022-02-22 17:22

个回答

  • 慕容1442360
    2022-03-15 21:22:54

    包没问题,演示中缺少了 年 的输出,你把对应位置的操作补上就可以运行了