Skip to content

关于支持多公众号的管理 #3421

@ttomato

Description

@ttomato

简要描述

在MP_Quick Start里提到,
WxMpService 需要在实际项目中保持单例,
请问是否可以使用WxJava同时管理对接多个公众号,如何使用?

WxMpDefaultConfigImpl config = new WxMpDefaultConfigImpl();
config.setAppId("..."); // 设置微信公众号的appid
config.setSecret("..."); // 设置微信公众号的app corpSecret
config.setToken("..."); // 设置微信公众号的token
config.setAesKey("..."); // 设置微信公众号的EncodingAESKey

WxMpService wxService = new WxMpServiceImpl();// 实际项目中请注意要保持单例,不要在每次请求时构造实例,具体可以参考demo项目
wxService.setWxMpConfigStorage(config);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions