package com.iotechn.unimall.admin;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

/**
 * @Author:chengchangjiang
 * @Description:
 * @Date:Created in 12:34 2022-06-16
 */
@Component
public class MyApplicationLisenter implements ApplicationListener<ContextRefreshedEvent> {

    private static Logger logger = LoggerFactory.getLogger(MyApplicationLisenter.class);

    @Override
    public void onApplicationEvent(ContextRefreshedEvent e) {
        logger.info("实现了ApplicationListener的onApplicationEvent方法");
//        new Thread(new Runnable() {
//            @Override
//            public void run() {
//            }
//        }).start();
    }


}
