package com.artfess.base.listener;

import com.artfess.base.feign.UCFeignService;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 服务启动成功的监听器
 *
 * @company 阿特菲斯信息技术有限公司
 * @author heyifan
 * @email heyf@jee-soft.cn
 * @date 2019年6月27日
 */
@Component
public class ApplicationReadyEventListener implements  ApplicationListener<ApplicationReadyEvent>{
	@Resource
	UCFeignService uCFeignService;

	@Override
	public void onApplicationEvent(ApplicationReadyEvent event) {

		System.out.println("***********************");
		System.out.println(String.format("********%s********", "应用已启动"));
		System.out.println("***********************");

		uCFeignService.systemStartCreateFile();
	}
}
