r/SpringBoot • u/alweed • Aug 04 '26
How-To/Tutorial I built a "real job" simulator for Spring Boot learners, free & open source
Most Spring Boot tutorials teach you to build a CRUD app and call it a day. But that's not really what the job looks like day to day, so I put together a project that mimics what you'd actually work on as a backend dev at a company with real infrastructure. I've added following 12 Tasks that you'd need to complete.
- Project setup: spin up Postgres + messaging brokers, verify everything's healthy
- Kicking off development: request validators, custom exceptions, a new order status API
- Debug a critical bug: chase down a duplicate-insert caused by misusing
EntityManager.persist()vssave() - ActiveMQ + Apache Camel: configure routes, consume from a queue, handle dead letter queues, publish to a Virtual Topic
- RabbitMQ: set up exchanges/bindings, fix an infinite redelivery bug, publish to a topic exchange
- DB schema migration: add a table with Liquibase, write rollback SQL, fix an N+1 write
- Testing: unit tests with Mockito, snapshot tests, integration tests with TestContainers
- Code style: enforce formatting automatically with Spotless + Palantir Java Format
- Prometheus metrics: expose app metrics via Actuator, configure scraping
- Grafana: connect to Prometheus, build dashboards, add @Timed annotations
- Load testing: run JMeter tests, interpret throughput, watch the impact in Grafana
- Global exception handling: swap per-controller try-catch for @ControllerAdvice + RFC 7807 Problem Details
Everything runs locally via Docker Compose, and there's a Bruno collection included so you can hit the APIs without writing your own Postman setup.
It's completely free and open source, so fork it, work through the tasks in order, and you'll come out the other side with a much better feel for what the job actually involves beyond "make endpoint, save to DB."
Would love feedback from people!
5
u/JonnyBago82 Aug 04 '26
Very nice.
4
u/ImportantYoghurt2767 Aug 05 '26
Overall, this is useful work; I'd like to do something similar.
The only thing I didn't quite understand was the lack of Validation on DTO objects. This is important because the OpenAPI generator uses this mechanism. For added complexity, you could consider custom validation annotations, cross-field validation, and so on.
Accordingly, adding OpenAPI documentation would be a good idea. This would immediately cover topics like JsonNullable and the correctness of the API schema description.
2
u/plastypup Aug 05 '26
Good one Man
2
u/_sallyBara Aug 05 '26
Nice work bro. Thanks, very useful
2
u/vampirishe Aug 07 '26
Nice job ! What do you think of adding also redis & kafka ?
2
u/JohnEP0 Aug 09 '26
Thanks! I’m currently learning spring boot for the purpose of looking for a java dev job immediately after I graduate. Will definitely give this one a try!
2
u/xvlet Aug 11 '26 edited Aug 11 '26
Nice project. The ActiveMQ + Camel especially caught my attention.
One thing that might be useful when working through those tasks is having a lightweight way to inspect queues/messages without switching to a browser-based admin console.
I’ve been working on an open-source terminal TUI for ActiveMQ that lets you browse messages, inspect queue/consumer stats, send messages, purge/delete messages, and monitor broker resources directly from the terminal.
https://github.com/xvlet/amqcli
It might be useful alongside the ActiveMQ tasks in this project.
1
u/RedditForW Aug 04 '26
Follow
-7
u/innocentVince Aug 04 '26
Feedback.
Any SOTA LLM can do that in sub 30 minutes. With proper unit tests and up-to-date dependencies.
I see no value here.
2
u/[deleted] Aug 05 '26
[removed] — view removed comment