package com.ycwl.basic.device.starter;

import com.ycwl.basic.device.operator.VptPassiveStorageOperator;
import com.ycwl.basic.device.operator.WvpPassiveStorageOperator;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;

@Configuration
public class DeviceStorageOperatorStarter implements InitializingBean {
    @Autowired
    private RedisTemplate<String, String> redisTemplate;

    @Override
    public void afterPropertiesSet() {
        WvpPassiveStorageOperator.setRedisTemplate(redisTemplate);
        VptPassiveStorageOperator.setRedisTemplate(redisTemplate);
    }
}
