BAOLH
2025-10-24 c247e1f3d0b19f7c6db74165650a29f0539f4b10
eladmin-master/eladmin-system/src/main/java/me/zhengjie/config/WxCpConfig.java
@@ -34,15 +34,13 @@
    @Bean
    public WxCpService wxCpService() {
//        // 默认缓存配置
//        WxCpDefaultConfigImpl configStorage = new WxCpDefaultConfigImpl();
        WxCpDefaultConfigImpl configStorage;
        if (wxCpProperties.getConfigStorage().getType().equals(WxCpProperties.StorageType.redistemplate)) {
            // redis缓存配置
            StringRedisTemplate redisTemplate = applicationContext.getBean(StringRedisTemplate.class);
            configStorage = new WxCpRedisTemplateConfigImpl(redisTemplate, wxCpProperties.getConfigStorage().getKeyPrefix());
        } else if (wxCpProperties.getConfigStorage().getType().equals(WxCpProperties.StorageType.jedis)) {
            // jedis配置
            WxCpRedisProperties wxCpRedisProperties = wxCpProperties.getConfigStorage().getRedis();
            JedisPool jedisPool;
            if (wxCpRedisProperties != null && StringUtils.isNotEmpty(wxCpRedisProperties.getHost())) {
@@ -52,7 +50,7 @@
            }
            configStorage = new WxCpJedisConfigImpl(jedisPool, wxCpProperties.getConfigStorage().getKeyPrefix());
        } else {
            // 默认配置
            // 默认缓存配置
            configStorage = new WxCpDefaultConfigImpl();
        }