public interface ApplicationEventPublisher {
/**
* Notify all listeners registered with this application of an application
* event. Events may be framework events (such as RequestHandledEvent)
* or application-specific events.
* @param event the event to publish
* @see org.springframework.web.context.support.RequestHandledEvent
*/
void publishEvent(ApplicationEvent event);
}
去就是给ApplicationContext包裹一层来进行发布事件的
每日一则JavaWeb---Spring的ApplicationEventPublisher的作用
最新推荐文章于 2024-09-26 11:11:21 发布