package com.palmnest.webapp.listener;

import com.palmnest.service.estateserve.FaceClientManager;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;

/**
 * 初始化Redis缓存数据——系统启动完成时候执行
 *
 * @author yubing
 * @since 2016-05-03
 */
@Slf4j
public class InstantiationTracingBeanPostProcessor implements ApplicationListener<ContextRefreshedEvent> {


	@Autowired
	private FaceClientManager faceClientManager;

	@Override
	public void onApplicationEvent(ContextRefreshedEvent event) {

		log.info("InstantiationTracingBeanPostProcessor....");
		faceClientManager.UpdateFaceCookieStore();
	}
}
