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:
parent
bd4881d478
commit
11b1112771
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue