non-spring-boot: how to register eventHandler and queryHandler

Hi

I am trying to get everything working without spring boot autoconfigure. Seems a lot changed from 3 to 4 …

With 3 I had:

final BankAccountProjection projection = new BankAccountProjection();

final Configuration configuration = DefaultConfigurer.defaultConfiguration()
.configureEventStore(c -> eventStore)
.registerModule(new EventHandlingConfiguration()
.registerEventHandler(c -> projection))
.registerQueryHandler(c -> projection)
.configureAggregate(BankAccount.class)
.buildConfiguration();
configuration.start();

But with 4, I fail to find the EventHandlingConfiguration to register the eventHandler. Ideas?

also: when I use my projection for event- and query handling, I will need to inject the queryUpdater, which I will probably not get upfront. How to enhance the configuration so my projection is update aware? Thanks!

Jan

ok, nevermind, found the docs on https://docs.axoniq.io/reference-guide/1.2-domain-logic/event-handling#registering-event-handlers:


val configuration = DefaultConfigurer.defaultConfiguration()
    .eventProcessing { epc -> epc.registerEventHandler { c -> projection } }
    .configureAggregate(
        AggregateConfigurer.defaultConfiguration(GiftCard::class.java)
    )
    .configureEventStore { eventStore }
    .buildConfiguration()