依舊報(bào)錯(cuò),是不是云的接口變了
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:78)
at com.imooc.weather.Application.main(Application.java:25)
Caused by: java.lang.RuntimeException: ognl.OgnlException: source is null for getProperty(null, "showapi_res_body")
at com.imooc.weather.impl.WeatherUtilsImpl.getValue(WeatherUtilsImpl.java:39)
at com.imooc.weather.impl.WeatherUtilsImpl.w24h(WeatherUtilsImpl.java:55)
... 1 more
Caused by: ognl.OgnlException: source is null for getProperty(null, "showapi_res_body")
at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2410)
at ognl.ASTProperty.getValueBody(ASTProperty.java:114)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
at ognl.SimpleNode.getValue(SimpleNode.java:258)
at ognl.ASTChain.getValueBody(ASTChain.java:141)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
at ognl.SimpleNode.getValue(SimpleNode.java:258)
at ognl.Ognl.getValue(Ognl.java:467)
at ognl.Ognl.getValue(Ognl.java:569)
at ognl.Ognl.getValue(Ognl.java:539)
at com.imooc.weather.impl.WeatherUtilsImpl.getValue(WeatherUtilsImpl.java:36)
... 2 more? ? 不知道是不是最新的返回的參數(shù)變了,改了調(diào)試地址url ,但是又有了新的問(wèn)題?
搜索
復(fù)制
2024-11-07
在云市場(chǎng)那邊有多個(gè)易源天氣預(yù)報(bào)的接口,找到URL跟老師一樣的那個(gè)”https://saweather.market.alicloudapi.com“,重新購(gòu)買(mǎi)就可以了
2023-09-17
搞定了。。。還是那個(gè)新地址的問(wèn)題,注意要把新地址里面的http(s)改為https,其次地址后面有個(gè)?area=別漏了
搜索
復(fù)制