# axon-event-sourcing Companion project for the article **[Event Sourcing with Axon Framework 5 and Spring Boot: Entities, Projections and Replays](https://ankurm.com/event-sourcing-axon-framework-5-spring-boot-entities-projections-replays/)** on **[ankurm.com](https://ankurm.com)**. There is deliberately **no `docs/` folder**: the deeper material lives in collapsible "going deeper" sections inside the article itself. ## Versions | | | |---|---| | Axon Framework | 5.4.2 (`org.axonframework.extensions.spring:axon-spring-boot-starter`) | | Spring Boot | 4.1.1 | | JDK | 25 (Temurin 25.0.5.1) | | H2 | 2.4.240 | | Hibernate ORM | 7.4.5.Final | ## Quickstart ``` ./scripts/run-all.sh # tests (writes output/01-04) + broken variants (output/05-07) ./scripts/run.sh # start the app on :8080 ``` ## Endpoints | | | |---|---| | `POST /accounts/{id}?owner=` | open an account | | `POST /accounts/{id}/deposit?amount=` | deposit | | `POST /accounts/{id}/withdraw?amount=` | withdraw | | `GET /accounts/{id}` | read model | | `GET /accounts/{id}/events` | raw stored events (diagnostic; delete before shipping) | | `POST /admin/replay` | rebuild the read model | ## Output index | File | Shows | |---|---| | `output/01-command-flow.txt` | commands, stored events, read model | | `output/02-rejections.txt` | refused commands leave no events | | `output/03-no-entity-table.txt` | the entity has no table | | `output/04-replay.txt` | read model lost and rebuilt | | `output/05-variant-tag-key-mismatch.txt` | JPA store ignores the tag key | | `output/06-variant-id-only-creator.txt` | id-only `@EntityCreator` yields no entity | | `output/07-variant-two-tags.txt` | JPA store rejects a second tag | `src/broken/` holds the deliberately broken sources for 05-07; they are outside the build.