|
|
@ -13,6 +13,7 @@ import me.chanjar.weixin.common.redis.RedisTemplateWxRedisOps; |
|
|
|
import me.chanjar.weixin.mp.api.WxMpMessageRouter; |
|
|
|
import me.chanjar.weixin.mp.api.WxMpService; |
|
|
|
import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl; |
|
|
|
import me.chanjar.weixin.mp.api.impl.WxMpServiceOkHttpImpl; |
|
|
|
import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl; |
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
@ -64,19 +65,10 @@ public class WxMpConfig { |
|
|
|
if (CollectionUtil.isEmpty(wxAppList)) { |
|
|
|
log.warn("公众号配置为空"); |
|
|
|
} |
|
|
|
WxMpService service = new WxMpServiceImpl(); |
|
|
|
WxMpService service = new WxMpServiceOkHttpImpl(); |
|
|
|
service.setMultiConfigStorages(wxAppList |
|
|
|
.stream().map(app -> { |
|
|
|
WxMpDefaultConfigImpl configStorage; |
|
|
|
// JedisPoolConfig poolConfig = new JedisPoolConfig();
|
|
|
|
// JedisPool jedisPool = new JedisPool(
|
|
|
|
// poolConfig,
|
|
|
|
// redisProperties.getHost(),
|
|
|
|
// redisProperties.getPort(),
|
|
|
|
// timeout,
|
|
|
|
// redisProperties.getPassword(),
|
|
|
|
// redisProperties.getDatabase());
|
|
|
|
// configStorage = new WxMpRedisConfigImpl(new JedisWxRedisOps(jedisPool), app.getId());
|
|
|
|
log.warn("进行公众号配置:{}",app.getId()); |
|
|
|
configStorage = new WxMpDefaultConfigImpl(); |
|
|
|
configStorage.setAppId(app.getId()); |
|
|
|