package com.hzs.sale.component.load;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @Description: 初始化订单服务的参数
 * @Author: sui q
 * @Time: 2022/9/16 17:15
 * @Classname: SaOrderLoadRunner
 * @PackageName: com.hzs.sale.component.load
 */
@Component
@Slf4j
public class SaleLoadRunner implements ApplicationRunner {

    private RedisComponent redisComponent;

    @Autowired
    public void setRedisComponent(RedisComponent redisComponent) {
        this.redisComponent = redisComponent;
    }

    @Override
    public void run(ApplicationArguments args) throws Exception {
        // 初始化订单服务的参数
        redisComponent.initConfig();
    }
}
