package cn.palmte.work.config;

import cn.palmte.work.service.map.MemorySimpleMap;
import cn.palmte.work.service.map.SimpleMap;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author xiongshiyan at 2018/8/14 , contact me with email yanshixiong@126.com or phone 15208384257
 */
@Configuration
public class SystemConfigWithMemory {

    @Value("${fourcal.token.api.prefix}")
    private String apiTokenPrefix;

    @Value("#{${fourcal.token.api.expires}}")
    private long apiExpires;

    @Value("${fourcal.token.pc.prefix}")
    private String pcTokenPrefix;

    @Value("#{${fourcal.token.pc.expires}}")
    private long pcExpires;


    @Bean
    public SimpleMap<String, String> simpleMap() {
        return new MemorySimpleMap<>();
    }
}
