This repository is meant to accompany this blog post. It attempts to lay out a pragmatic approach for creating a system based on the Axon Framework that avoids common pitfalls and supports maintainability.
The application has three profiles: rest
, command
and query
.
To run the application with all profiles active, simply do: $ ./gradlew bootRun
To run the application with a specific profile, do: $ SPRING_PROFILES_ACTIVE={profile} ./gradlew bootRun
For example: $ SPRING_PROFILES_ACTIVE=command ./gradlew bootRun
This app has thorough automated tests, including unit tests using Axon's test fixtures for testing aggregates and sagas. Other tests include a spring boot application context test and @DataJpaTest
.
To start the tests, do $ ./gradlew test
.