SpringBeanParameterResolverFactory with null applicationContext

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:


public AggregateFactory<ChequeSettingsAggregate> settingsAggregateFactory() {
    return new SpringPrototypeAggregateFactory<>("settingsAggregate");

@Bean(name = "settingsAggregateRepository")
public Repository<SettingsAggregate> settingsAggregateRepository(
        EventStore eventStore, SnapshotTriggerDefinition snapshotTriggerDefinition) {

    return new MyEventRepository<>(


MyEventRepository extends EventSourcingRepository.

Here's my service:

Hi Bruno,

sorry for the late reply. I have posted an answer on Stackoverflow: https://stackoverflow.com/a/59392788/1419924

Kind regards,

No worries Allard, I have been busy refactoring how we structure our microservices and how we use Axon, so this gave me time to change some other things that took priority over this issue. I am just done with that refactoring, so your response came right on time.

I will post any further replies on Stackoverflow.

Just for completion, the solution was very simple. Just added some code to my aggregate config: