Engineering With Java: Digest #59
Clean exception handling, API throttling without external libs, monolith vs microservices decision-making for 2025, and zero-trust OAuth2/JWT security in Spring Boot and more ...
Welcome to this week’s edition! I hope you all had a great, productive week. We have summarized this week’s Java and Spring Boot update in a 5-minute summary.
We have changed the format of the newsletter, so please feel free to comment if you like or dislike something. Also, we are reaching towards 2.5k subscribers, so I would like to thank you all for your valuable time ❤️
I would appreciate it if you could recommend this newsletter to your circle with your fellow Java developers.
📝 Articles Of The Week (8)
Clean Exception Handling in Java: A Framework-Agnostic Approach to Maintainable Error Flow - Presents a framework-agnostic way to handle Java exceptions by using a clear, domain-specific hierarchy, functional patterns like
Either
, and centralized error mapping to ensure consistent, maintainable error flows.How to Build an MCP Server With Java SDK - Guides building a Modular Control Plane (MCP) server in Java using an SDK for dynamic resource management and modular design.Focuses on clean architecture, lifecycle handling, and exposing APIs for scalable distributed systems.
API Throttling Logic in Spring Boot Without External Libraries - Explains & demonstrates how to implement API throttling directly in Spring Boot without relying on external libraries by using request interceptors and in-memory counters.
🧱 Monolith or 🧩 Microservices in 2025? - Compares monolith and microservices architectures in 2025, highlighting that while microservices offer scalability and flexibility, monoliths remain simpler to develop and maintain for many use cases.
Suggests a balanced, pragmatic approach—choosing the right architecture based on team size, project complexity, and long-term goals rather than blindly favoring microservices.Zero-Trust API Access with OAuth2 & JWT in Spring Boot - Configure Spring Boot as an OAuth2 Resource Server to validate JWTs issued by an external authorization server. Enforce role-based access, customize JWT claim-to-role mapping, and support stateless, scalable authentication—all while keeping development friction low.
Optimizing JSON Performance in Java: What Actually Works - Advises against using the outdated
org.json
library due to poor performance and lack of thread safety. Recommends faster, production-ready options like Jackson, Gson, or Jsoniter, with proper tuning for maximum speed.A Practical Guide to Null-Safety in Java With JSpecify - Article explains JSpecify, a Java community-driven effort to standardize nullness annotations for better null-safety in Java code. Covers how JSpecify annotations help tools detect potential null pointer exceptions early by making null contracts explicit without being tied to a single framework.
Inline Images in Email Using Java Mail - Send emails with inline images using JavaMail by embedding images as MIME body parts with Content-ID references. Enables embedding pictures directly inside the email content, enhancing visual appeal without requiring recipients to download attachments separately.
💬 Social Media Posts Of The Week (3)
Kyle shares a distributed systems reliability glossary - a curated reference designed for developers and engineers to deepen their understanding of reliability concepts in distributed systems.
Gunnar talks about the importance of enabling query logging in Hibernate during development.
Roman shares about elegantly restricting access to REST controllers in Spring Boot using
@PreAuthorize
and Spring Expression Language (SpEL) — no messy manual permission checks in the controller!
▶️ Videos Of The Week
Java Techie teaches how to build resilient, fault-tolerant workflows in Spring Boot using Temporal with retries, timeouts, and failure recovery.
Simplilearn offers a 9-hour Core Java tutorial for beginners.
Sergey Chernov shares how their platform team optimized Spring-based integration tests across a massive monolith and 200+ microservices.
He dives into memory, container lifecycle, and context reuse challenges, offering practical strategies to reduce flakiness, resource usage, and CI overhead at scale.
🛠️ Code & Tools Of The Week
Modelmapper is a Java object mapping library that simplifies converting one object to another, especially when dealing with DTOs (Data Transfer Objects) and entity objects in layered architectures.
Spotlees is a versatile code formatting and linting tool built for a wide variety of languages and build systems.
🧑🏻💻 Interview Prep
Some mid-level interview/coding questions ( this newsletter )
Evergreen list of Theoretical Java Interview Questions
📚 Books Of The Week
Thanks for making it till the end. If you like this newsletter, please consider subscribing and sharing with your fellow Java developers.
If you like to sponsor this newsletter please email at: surajmishra150893@gmail.com. Basic details can be found here.
To connect with me, LinkedIn | Twitter. If you have any questions related to SWE/Career, etc, don’t hesitate to DM me. I would love to help my fellow SWEs using my 9 years of experience working in fintech across different countries. ( India/Japan/US/Canada )