Class AuditCollectionCreator

java.lang.Object
org.saidone.component.BaseComponent
org.saidone.component.AuditCollectionCreator
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

@Component public class AuditCollectionCreator extends BaseComponent
Creates and configures the MongoDB time series collection used to persist audit entries.

The collection is initialised on startup if it does not already exist and is configured with a TTL index so that documents expire automatically after ttlDays days.

  • Constructor Details

    • AuditCollectionCreator

      public AuditCollectionCreator()
  • Method Details

    • init

      @PostConstruct public void init()
      Creates the audit collection if it does not already exist and configures the collection to expire entries after ttlDays days.
      Overrides:
      init in class BaseComponent