BAEL-2435 Update the event handler
Change the event handler to become a spring service, as this way Axon will automatically pick it up as an event handling component
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
package com.baeldung.axon.eventhandlers;
|
||||
|
||||
import com.baeldung.axon.events.MessageReadEvent;
|
||||
import com.baeldung.axon.events.MessageCreatedEvent;
|
||||
import org.axonframework.eventhandling.EventHandler;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baeldung.axon.events.MessageCreatedEvent;
|
||||
import com.baeldung.axon.events.MessageReadEvent;
|
||||
|
||||
@Service
|
||||
public class MessagesEventHandler {
|
||||
|
||||
@EventHandler
|
||||
|
||||
Reference in New Issue
Block a user