I am facing a very similar issue to the one reported in https://groups.google.com/forum/#!searchin/axonframework/aggregate$20injection|sort:date/axonframework/EPlVXbdZv34/xCoNL5nGAgAJ
The reason I created a new issue is due to the fact that I don’t really want to use the proposed solution and would also like to understand a few things.
Here’s my aggregate config:
`
@Bean
public AggregateFactory<ChequeSettingsAggregate> settingsAggregateFactory() {
return new SpringPrototypeAggregateFactory<>("settingsAggregate");
}
@Bean(name = "settingsAggregateRepository")
public Repository<SettingsAggregate> settingsAggregateRepository(
EventStore eventStore, SnapshotTriggerDefinition snapshotTriggerDefinition) {
return new MyEventRepository<>(
SettingsAggregate.class,
settingsAggregateFactory(),
eventStore,
snapshotTriggerDefinition);
}
`
MyEventRepository extends EventSourcingRepository.
Here's my service: