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:
Steven van Beelen 2018-12-18 14:48:10 +01:00
parent bd4881d478
commit 11b1112771
1 changed files with 4 additions and 2 deletions

View File

@ -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