forked from 007gzs/weixin-java-open-demo
-
Notifications
You must be signed in to change notification settings - Fork 150
Open
Description
WxMaService maService = new WxMaServiceImpl();
maService.setMultiConfigs(
configs.stream()
.map(a -> {
// WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl();
WxMaDefaultConfigImpl config = new WxMaRedissonConfigImpl(redissonClient);
// WxMaDefaultConfigImpl config = new WxMaRedisConfigImpl(new JedisPool());
// 使用上面的配置时,需要同时引入jedis-lock的依赖,否则会报类无法找到的异常
config.setAppid(a.getAppid());
config.setSecret(a.getSecret());
config.setToken(a.getToken());
config.setAesKey(a.getAesKey());
config.setMsgDataFormat(a.getMsgDataFormat());
return config;
}).collect(Collectors.toMap(WxMaDefaultConfigImpl::getAppid, a -> a, (o, n) -> o)));
这里只需要指定实现为WxMaRedisConfigImpl即可吗?还是需要去重写WxMaDefaultConfigImpl的方法
Metadata
Metadata
Assignees
Labels
No labels