Engineering With Java: Digest #63
Java profilers, database migrations, essential utilities, spring test, access token, memory footprint reduction and more...
Welcome to this week’s edition! I hope you all are doing great in your careers. We have summarized this week’s Java and Spring Boot updates in a 5-minute summary.
Channel stats:
Subscribers change - 2578 → 2683 ( Thank you for subscribing, it means a lot ❤️ )
Paid subscribers change - 2 → 3 ( Thank you for supporting my work ❤️)
📝 Articles Of The Week (7)
Unleash the Power of Open Source Java Profilers: Comparing VisualVM, JMC, and async-profiler - Highlighting their strengths in debugging and performance analysis. VisualVM is easy to use for local development, JMC excels at low-overhead production monitoring, and async-profiler offers high-precision CPU and allocation profiling with minimal performance impact. Teams often use a combination of these tools, choosing based on environment and depth of analysis required
Spring Boot & Flyway: Manage Multiple Databases - Shows how to configure Spring Boot with Flyway to manage migrations across multiple databases. It sets up separate datasource beans and points each to its own migration script folder to avoid conflicts. This approach keeps schemas in sync while supporting modular or microservices architectures.
Essential Utility Classes to Supercharge Your Spring Boot Projects - Lists 50 essential utility classes from Spring, Apache Commons, Guava, and custom helpers that can streamline Spring Boot development. These utilities handle common tasks like string manipulation, collections handling, and date/time operations, reducing boilerplate and improving readability. It begins with
StringUtils
from Spring as an example of safer, cleaner string handling.Dynamic Rate Adjustments in Spring Boot Scheduled Jobs - Discusses how Spring Boot’s
@Scheduled
annotation only supports static schedules, which can’t adapt to changing conditions. To enable flexibility, it suggests usingTaskScheduler
it with customTrigger
implementations that recalculate execution times dynamically. This approach allows scheduled jobs to adjust their frequency at runtime without restarting the application.Optimizing Spring Integration Tests at Scale - Provides strategies to enhance the efficiency and reliability of integration tests in Spring applications. It discusses the importance of managing resources like Docker containers and thread pools to prevent leaks and reduce overhead. By implementing best practices, developers can achieve faster test execution and more stable deployments.
How to Reduce Spring Boot Memory Usage? - Provides practical strategies to optimize memory consumption in Spring Boot applications. It covers techniques such as adjusting JVM flags to match container memory limits, removing unused starter dependencies, disabling unnecessary caches, and considering a 32-bit JVM for smaller applications. The piece emphasizes the importance of balancing optimization with the application's actual memory needs to avoid over-optimization and potential issues
Access Token Refresh Flows in Spring Boot Security - Explains how Spring Boot and Spring Authorization Server manage access and refresh tokens to maintain secure and seamless user authentication. It details the process of exchanging expired access tokens for new ones using refresh tokens, including how to configure token lifetimes and enable refresh token rotation to prevent replay attacks.
▶️ Videos Of The Week (3)
Java 21 ⮕ 25: Performance and Runtime Enhancements - JDK 25 improves performance with fixes for virtual threads in synchronized blocks, faster string operations, and compact object headers that reduce memory usage and GC pauses. Benchmarks show better startup times and higher throughput compared to JDK 21, though memory usage can be slightly higher.
Top 10 Rest API Design Pitfalls by Victor Rentea - Avoiding breaking changes in REST APIs and maintaining backward compatibility is crucial while guiding clients through migrations. Common pitfalls include large GET payloads, misuse of batch requests, and overly complex responses, all of which contribute to increased technical debt. Clear, consistent API design helps reduce these risks and ensures smoother client adoption.
You don't need Elasticsearch! Fuzzy Search with PostgreSQL and Spring Data -PostgreSQL can handle fuzzy search in many cases without requiring Elasticsearch, particularly when dealing with user input containing typos, misspellings, or variations. Naive approaches like
ILIKE
provide basic pattern matching, but trigram similarity operators allow more advanced matching by comparing string similarity scores. Indexing strategies such as GiST and GIN improve performance, with GIN indexes typically offering faster lookups for fuzzy search queries.
💬 Social Media Posts Of The Week (2)
The Outbox Pattern ensures consistency in microservices by writing business data and events in the same DB transaction and later publishing from an outbox table. Debezium uses CDC to stream these changes directly into Kafka, guaranteeing ordering and reliability without custom polling. Together, they simplify event delivery and prevent data loss in production systems.
Spring beans differ by scope, which controls their creation frequency, lifespan, and visibility. Common scopes include singleton (one shared instance), prototype (new instance per request), request/session/application (scoped to web contexts), and WebSocket (scoped to a socket session). Picking the right scope ensures proper resource use, avoids memory leaks, and prevents concurrency issues.
🛠️ Code & Tools Of The Week (2)
Leaf is Meituan’s open-source distributed ID generation service that ensures globally unique, monotonic IDs with high performance. It supports two modes: Segment Mode (fetching ID ranges from a DB for high throughput) and Snowflake Mode (using ZooKeeper for unique worker IDs). With features like dual-buffer fault tolerance and low-latency delivery, Leaf reliably powers large-scale microservices.
Spoon is an open-source Java library that builds a detailed Abstract Syntax Tree (AST) from source code, enabling powerful code analysis and transformation. It supports Java versions up to at least 20 and provides an intuitive API that closely mirrors Java language constructs. Spoon can be used for static analysis, automatic refactoring, code generation, and pretty-printing in a consistent, programmatic way.
📚 Books Of The Week
Practical Spring Boot Projects for Everyday Development -eBook helps developers go beyond basic CRUD apps by building real-world backend systems. It features 20 core projects and 41 advanced follow-ups covering REST APIs, security, caching, databases, AOP, and testing. With over 120 code snippets, it provides a structured roadmap to enhance problem-solving and backend development skills.
Hands on: Apache Kafka - teaches Apache Kafka from basics to advanced topics, including cluster architecture, installation, and core APIs like Producer, Consumer, Streams, and Connect. It covers integration with Spring Boot and Spring Cloud Stream and includes practical projects for building data pipelines and real-time streaming applications. Readers gain hands-on experience to develop scalable, fault-tolerant, and high-performing data streaming solutions.
🧑🏻💻 Interview Prep (2)
Grokking the Java Interview (Vol 1 & 2)
Grokking the Spring Boot Interview
Grokking the SQL Interview
Java SE 17 Developer Certification (1Z0-829) Guide
250+ Spring Framework Certification Practice Questions
Master Hibernate and JPA with Spring Boot in 100 Steps: teaches Hibernate and JPA with Spring Boot, covering entity mapping, relationships, queries, performance optimization, caching, and Spring Data JPA integration, enabling learners to build efficient, robust applications.
Check out our in-house new quizzes(3) and interview(21) questions.
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 or have a product that you want to promote please email at: surajmishra150893@gmail.com. Basic details can be found here.
To connect with me, LinkedIn | Twitter.If you have any questions about software engineering, careers, or related topics, feel free to DM me. I’d be happy to share insights from my 9 years of experience in fintech across India, Japan, the US, and Canada to help fellow software engineers.