package com.tykj.dev.device.library.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * DATE:2021-8-11
 * Author:zsp
 */
@Component
@Slf4j
public class MyInitializer implements ApplicationListener<ApplicationReadyEvent> {
    @Autowired
    private DeviceLibraryCacheService cacheLibraryService;
    @Override
    public void onApplicationEvent(ApplicationReadyEvent event) {
        log.info("[缓存模块] 加载装备缓存模块...");
      cacheLibraryService.getAllDeviceLibraryList();
    }
}
