shikeyin
2024-01-11 65da8373531677b1c37a98f53eaa30c892f35e5a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.ishop.mobile.config;
 
import com.iplatform.core.PlatformConfiguration;
import com.ishop.mobile.PreOrderCacheProvider;
import com.ishop.mobile.WechatOpenIdCache;
import com.ishop.mobile.cache.LocalPreOrderCache;
import com.ishop.mobile.cache.LocalWechatOpenIdCache;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
 
@Configuration
@ConditionalOnProperty(prefix = "iplatform.cache", name = "redis-enabled", havingValue = "false", matchIfMissing = true)
public class LocalMobileCacheConfig extends PlatformConfiguration {
 
    @Bean
    public WechatOpenIdCache wechatOpenIdCache(){
        LocalWechatOpenIdCache cache = new LocalWechatOpenIdCache();
        return cache;
    }
 
    @Bean
    public PreOrderCacheProvider preOrderCacheProvider(){
        LocalPreOrderCache cache = new LocalPreOrderCache();
        return cache;
    }
}