Snapshotter snapshotter
companies/src/main/java/org/axonframework/samples/trader/company/config/CompaniesConfig.java
return new EventCountSnapshotTriggerDefinition(snapshotter, SNAPSHOT_THRESHOLD);
SnapshotTriggerDefinition snapshotTriggerDefinition(Snapshotter snapshotter)
EventStore eventStore  Cache cache
companies/src/main/java/org/axonframework/samples/trader/company/config/CompaniesConfig.java
//
//        EventCountSnapshotTriggerDefinition snapshotTriggerDefinition = new EventCountSnapshotTriggerDefinition(
//                new SpringAggregateSnapshotter(),
//                SNAPSHOT_TRESHHOLD);
//
//        AggregateConfigurer<Company> companyAggregateConfigurer = AggregateConfigurer
//                .defaultConfiguration(Company.class);
//
//        CachingEventSourcingRepository<Company> repository = new CachingEventSourcingRepository<>(
//                companyAggregateConfigurer,
//                eventStore,
//                cache,
//                snapshotTriggerDefinition);
//
//        return companyAggregateConfigurer.configureRepository(conf -> repository);
//
Repository companyRepository(EventStore eventStore, Cache cache)