Articles

  1. Distributed locks with Spring Integration and RedisTwo instances of the same Spring Boot application can pick up the same payment callback within milliseconds, and a synchronized block protects only one JVM. A…
  2. Creating custom Jackson serializers and deserializersJackson’s ObjectMapper already converts most Java values correctly, but APIs often need a stricter or different contract. A custom serializer can emit an…
  3. Setting Up HikariCP for Production Java ApplicationsOpening a socket to PostgreSQL for every query costs a TCP handshake, a TLS handshake, authentication, and session setup. That overhead is tolerable once an…
  4. Using Spring Boot WebFlux For Reactive ProgrammingSpring Boot WebFlux provides a non-blocking approach to building Java web applications. Instead of assigning a waiting thread to every request, the framework…
  5. Using Java Sockets for Low-Level TCP CommunicationJava sockets provide a direct way to exchange bytes between applications over TCP. While frameworks such as Spring Boot and Java Message Service simplify many…
  6. Implementing Logging With AOP In SpringImplementing a Logging Mechanism with Aspect-Oriented Programming in Spring helps teams observe application behaviour without filling controllers, services,…
  7. How to Handle JSON Polymorphism and Inheritance with JacksonJSON polymorphism allows one API payload to represent several related Java types. A payment request, for example, might be a card payment, bank transfer, or…
  8. Spring Boot database testing with TestcontainersIntegration tests often expose problems that mocked repositories conceal: malformed SQL, incompatible column types, broken transactions, and migration errors.…
  9. Creating an event-driven architecture with Spring Events and AsyncSpring Events offer a straightforward way to decouple business actions within a Java application. An order service can publish an event, while fulfilment,…
  10. Walking directories with Java FileVisitorTasks such as backing up a project, scanning generated assets, or collecting file metadata quickly become recursive operations. Java’s FileVisitor fits this…