package com.njzscloud.dispose.cst.order.config;

import com.njzscloud.dispose.cst.order.service.TruckWeighingEventListener;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Configuration;

/**
 * 车辆称重配置
 * 用于初始化车辆称重事件监听器
 *
 * @author ljw
 */
@Slf4j
@Configuration
@RequiredArgsConstructor
public class TruckWeighingConfig implements CommandLineRunner {

    private final TruckWeighingEventListener truckWeighingEventListener;

    @Override
    public void run(String... args) {
        log.info("启动车辆称重事件监听器");
        truckWeighingEventListener.init();
    }
}
