本文整理汇总了Java中me.chanjar.weixin.mp.api.WxMpInMemoryConfigStorage.setToken方法的典型用法代码示例。如果您正苦于以下问题:Java WxMpInMemoryConfigStorage.setToken方法的具体用法?Java WxMpInMemoryConfigStorage.setToken怎么用?Java WxMpInMemoryConfigStorage.setToken使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类me.chanjar.weixin.mp.api.WxMpInMemoryConfigStorage
的用法示例。
在下文中一共展示了WxMpInMemoryConfigStorage.setToken方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: wxMpConfigStorage
import me.chanjar.weixin.mp.api.WxMpInMemoryConfigStorage; //导入方法依赖的package包/类
/**
* 微信公众号配置
*
* @return
*/
private static WxMpConfigStorage wxMpConfigStorage() {
WxMpInMemoryConfigStorage configStorage = new WxMpInMemoryConfigStorage();
configStorage.setAppId(Init.configer.getWechatAppId());
configStorage.setSecret(Init.configer.getWechatAppSecret());
configStorage.setToken(Init.configer.getWechatToken());
configStorage.setAesKey(Init.configer.getWechatAesKey());
return configStorage;
}
示例2: wxMpInMemoryConfigStorage
import me.chanjar.weixin.mp.api.WxMpInMemoryConfigStorage; //导入方法依赖的package包/类
@Bean
@ConditionalOnMissingBean
public WxMpInMemoryConfigStorage wxMpInMemoryConfigStorage() {
WxMpInMemoryConfigStorage configStorage = new WxMpInMemoryConfigStorage();
configStorage.setAppId(properties.getAppId());
configStorage.setSecret(properties.getSecret());
configStorage.setToken(properties.getToken());
configStorage.setAesKey(properties.getAesKey());
configStorage.setPartnerId(properties.getPartnerId());
configStorage.setPartnerKey(properties.getPartnerKey());
return configStorage;
}
示例3: init
import me.chanjar.weixin.mp.api.WxMpInMemoryConfigStorage; //导入方法依赖的package包/类
@PostConstruct
public void init() {
WxMpInMemoryConfigStorage config = new WxMpInMemoryConfigStorage();
config.setAppId(appId);// 设置微信公众号的appid
config.setSecret(secret);// 设置微信公众号的app corpSecret
config.setToken(token);// 设置微信公众号的token
config.setAesKey(aesKey);// 设置消息加解密密钥
this.mpService = new WxMpServiceImpl();
mpService.setWxMpConfigStorage(config);
}
示例4: WeixinController
import me.chanjar.weixin.mp.api.WxMpInMemoryConfigStorage; //导入方法依赖的package包/类
@Autowired
public WeixinController(IArticleService articleService, IConfigService configService) {
this.articleService = articleService;
WxMpInMemoryConfigStorage config = new WxMpInMemoryConfigStorage();
config.setAppId(configService.getWeixinId());
config.setSecret(configService.getWeixinSecret());
config.setToken(configService.getWeixinToken());
config.setAesKey(configService.getWeixinKey());
WxMpService wxService = new WxMpServiceImpl();
wxService.setWxMpConfigStorage(config);
}
示例5: wxMpInMemoryConfigStorage
import me.chanjar.weixin.mp.api.WxMpInMemoryConfigStorage; //导入方法依赖的package包/类
@Bean
public WxMpInMemoryConfigStorage wxMpInMemoryConfigStorage(WxOauth info) {
WxMpInMemoryConfigStorage config = new WxMpInMemoryConfigStorage();
config.setAppId(info.getAppId()); // 设置微信公众号的appid
config.setSecret(info.getSecret()); // 设置微信公众号的app corpSecret
config.setToken(info.getToken()); // 设置微信公众号的token
config.setAesKey(info.getAesKey()); // 设置微信公众号的EncodingAESKey
return config;
}