Class MongoMappingEventPublisher

java.lang.Object
org.springframework.data.mongodb.core.index.MongoMappingEventPublisher
All Implemented Interfaces:
org.springframework.context.ApplicationEventPublisher

public class MongoMappingEventPublisher extends Object implements org.springframework.context.ApplicationEventPublisher
An implementation of ApplicationEventPublisher that will only fire MappingContextEvents for use by the index creator when MongoTemplate is used 'stand-alone', that is not declared inside a Spring ApplicationContext. Declare MongoTemplate inside an ApplicationContext to enable the publishing of all persistence events such as AfterLoadEvent, AfterSaveEvent, etc.
Author:
Jon Brisbin, Oliver Gierke, Mark Paluch
  • Constructor Details

  • Method Details

    • publishEvent

      public void publishEvent(org.springframework.context.ApplicationEvent event)
      Specified by:
      publishEvent in interface org.springframework.context.ApplicationEventPublisher
    • publishEvent

      public void publishEvent(Object event)
      Specified by:
      publishEvent in interface org.springframework.context.ApplicationEventPublisher