token获取到为null ,是因为appID和appsecret需要用到的是测试账号的ID和appsecret,不是订阅号的,两者是不一样的。
2017-05-18
Exception in thread "main" java.lang.NullPointerException
at com.graduation.util.WeixinUtil.doGetStr(WeixinUtil.java:37)
at com.graduation.util.WeixinUtil.getAccessToken(WeixinUtil.java:95)
at com.graduation.test.WeiXinTest.main(WeiXinTest.java:8)
at com.graduation.util.WeixinUtil.doGetStr(WeixinUtil.java:37)
at com.graduation.util.WeixinUtil.getAccessToken(WeixinUtil.java:95)
at com.graduation.test.WeiXinTest.main(WeiXinTest.java:8)
2017-05-09