Showing Post From Blog
save, saveAndFlush, and REQUIRES_NEW: The Hibernate Questions Hiding in One Spring Service Method
Last week I was reading a teammate’s PR and stopped on a method that made me realise I’d been writing Spring + Hibernate code for years without actually understanding what save, flush, commit, and REQUIRES_NEW each do.
Javadoc Best Practices for Spring Boot - 5-Minute Professional Guide 2025
You’ve written clean code. Your tests pass. Your PR is ready. Then comes the review comment: “Please add Javadoc.”
Sound familiar?
Most developers know they should document their code, but Javadoc often feels like an afterthought—time-consuming, repetitive, and unclear about what actually matters.
Read moreSpring Boot Testing Strategy – Context Management & Perf Secrets (Part 2)
Every second saved in test execution multiplies across your entire team and CI/CD pipeline. A 10x improvement in test performance can save hours of developer time daily—transforming a 10-minute test suite into a 1-minute feedback loop.
The culprit? Poor context management—the #1 cause of slow Spring Boot test suites.
Read moreSpring Boot Testing Strategy – Ultimate Cheatsheet 2025 (Part 1)
Most Spring Boot testing articles bury you in theory. This one is built for action: a battle-tested reference you can keep open while coding.
In this Part 1, you’ll get:
- The 70-20-10 testing pyramid that actually works
- Layer-by-layer testing strategies with code snippets
- The smart mocking framework for Spring Boot
- Planning techniques to design tests in minutes
- Quick-reference annotations, IntelliJ templates, fixes, and anti-patterns
Testing Strategy & Philosophy
The 70-20-10 Testing Pyramid
| Layer | Allocation | Purpose | Speed | When to Use |
|---|---|---|---|---|
| Unit | 70% | Test logic in isolation | ⚡⚡⚡ | Business logic, calculations |
| Integration | 20% | Verify components work together | ⚡⚡ | DB ops, API calls, workflows |
| E2E/UI | 10% | Validate complete user journeys | ⚡ | Critical flows, UI interaction |
Why this works in Spring Boot:
Read more


