com.tlcsdm.log.base.EventPublishService Maven / Gradle / Ivy
package com.tlcsdm.log.base;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationEventPublisherAware;
/**
* @author: 唐 亮
* @date: 2022/3/13 0:25
* @since: 1.0
*/
public class EventPublishService implements ApplicationEventPublisherAware {
private ApplicationEventPublisher applicationEventPublisher;
@Override
public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {
this.applicationEventPublisher = applicationEventPublisher;
}
public void publishEvent(ApplicationEvent event) {
applicationEventPublisher.publishEvent(event);
}
}