package com.yeejoin.amos.fas.business.action.util;

import com.yeejoin.amos.fas.business.action.model.ContingencyEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

@Component
public class ContingencyLogPublisher {
	@Autowired
	//注入ApplicationContext用来发布事件
	ApplicationContext applicationContext;
	//使用ApplicationContext的publishEvent方法来发布
    public void publish(ContingencyEvent msg){
        applicationContext.publishEvent(msg);
    }
}
