buckpal
buckpal copied to clipboard
How can I publish domain event?
I want to publish domain event when changed domain. What should I do?
For example
public class Account {
public boolean withdraw(Money money, AccountId targetAccountId) {
// codes..
Event.raise(new AccountWithdrawEvent(targetAccountId, money)); // <-- here
}
}