In the Command Query Responsibility Segregation (CQRS) section of the book, we described how DDD and CQRS complement each other and how the command side (write requests) is the home of business logic. In this chapter, we will implement the command-side API for the Letter of Credit (LC) application using Spring Boot, Axon Framework, JSR-303 bean validations, and persistence options by contrasting between state-stored and event-sourced aggregates. The list of topics to be covered is as follows:
- Identifying aggregates
- Handling commands and emitting events
- Test-driving the application
- Persisting aggregates
- Performing validations
By the end of this chapter, you will have learned how to implement the core...