Wechat-Group / WxJava

微信开发 Java SDK ,支持包括微信支付,开放平台,小程序,企业微信,视频号,公众号等的后端开发

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WxMpApiUrl getUrl方法抛出'java.lang.reflect.InaccessibleObjectException'异常

piratekingtom opened this issue · comments

 public interface WxMpApiUrl {
    default String getUrl(WxMpConfigStorage config) {
        WxMpHostConfig hostConfig = null;
        if (config != null) {
            hostConfig = config.getHostConfig();
        }

        return WxMpHostConfig.buildUrl(hostConfig, this.getPrefix(), this.getPath());
    }
}

config.getHostConfig(); 方法抛出'java.lang.reflect.InaccessibleObjectException'异常. 无法评估 me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl.toString()
获取微信模板列表报错
4.6版本

this.wxService.switchoverTo(appid).getTemplateMsgService().getAllPrivateTemplate();

但是我用获取菜单的接口是没有问题的

异常信息不能给全一下吗?

@binarywang
image
已经给全了大佬,我写的代码也就一句,报错也是一句,没完整的堆栈
用的这个demo,就加了一句this.wxService.switchoverTo(appid).getTemplateMsgService().getAllPrivateTemplate();
https://gitee.com/binary/weixin-java-mp-demo-springboot.git

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.