Learn how to apply retry logic to CompletableFuture objects.
Also find me here:
Baeldung Author
Emanuel Trandafir
I'm Emanuel Trandafir, a passionate Java developer eager to explore and share insights on diverse programming paradigms, tools, and practices. I actively encourage my readers to join me in meaningful discussions, allowing us to learn from each other's perspectives. Beyond work, I love staying active through sports, hiking, and traveling, and I've recently switched from long-distance running to the thrill of rock climbing.
Here's what I've written (so far):
Baeldung on Java
- All
- Testing (4)
- Spring Data (3)
- Persistence (3)
- Java Concurrency (3)
- Spring Web (2)
- Reactive (2)
- Programming (2)
- Java Streams (2)
- Java (2)
- Web Services (1)
- Java Dates (1)
- Java Collections (1)
- Docker (1)
- Architecture (1)
How to Reuse Testcontainers in Java
Learn how to reuse Testcontainers when setting up the environment for local development and testing.
Partition a Stream in Java
Filed under Java Streams
Explore various ways of partitioning a Stream in Java.
Built-in Testcontainers Support in Spring Boot
Filed under Testing
Learn about the enhanced Testcontainers support introduced in Spring Boot 3.1.
CompletableFuture allOf().join() vs. CompletableFuture.join()
Filed under Java Concurrency
Explore CompletableFuture.allOf() method and the differences between it and calling join() on multiple separate CompletableFuture instances.
CompletableFuture and ThreadPool in Java
Filed under Java Concurrency
Learn about Java’s CompletableFuture and the thread pool it leverages.
Cognitive Complexity and Its Effect on the Code
Filed under Programming
A quick and practical guide to cognitive complexity.
Hibernate Natural IDs in Spring Boot
Filed under Spring Data
Learn about the @NaturalId annotation and how to use and implement it in a Spring Boot project.
A Guide to @Timeout Annotation in JUnit 5
Filed under Testing
Explore JUnit5’s new @Timeout annotation.
Difference Between Fluent Interface and Builder Pattern in Java
Filed under Programming
Discover the differences between the fluent interface design pattern and the builder pattern.
Anemic vs. Rich Domain Objects
Filed under Architecture
Explore the differences between anemic and rich domain models in Java.
JUnit 5 @Nested Test Classes
Filed under Testing
Learn about JUnit 5’s @Nested annotation.
Extracting a Custom Header From the Request
Filed under Spring Web
Learn various ways of extracting the request headers for a Spring application.
RxJava Single.just() vs Single.fromCallable()
Filed under Reactive
Learn two popular ways of creating a Single object in RxJava.
Java Generics PECS – Producer Extends Consumer Super
Filed under Java Collections
Explore the usage of Java Generics when it comes to producing and consuming collections.
How to Access the First Element of a Flux
Filed under Reactive
Explore various ways of accessing the first element of a Flux.
Comparison Between Mono’s doOnNext() and doOnSuccess()
Filed under Spring Web
Learn about various listeners’ options of the Mono object from Spring 5 WebFlux.
Patterns for Iterating Over Large Result Sets With Spring Data JPA
Filed under Spring Data
Learn various ways of iterating through large data sets retrieved with Spring Data JPA.
Basic Authentication With Postman
Filed under Web Services
Learn how to use Postman to test an endpoint secured with Basic Authentication.
Java 8 Streams: Multiple Filters vs. Complex Condition
Filed under Java Streams
Let’s compare different ways of filtering Java Streams.
Java 14 Record vs. Lombok
Filed under Java
Learn the differences and similarities between Java 14 Records and Lombok.
Hibernate’s “Detached Entity Passed to Persist” Error
Filed under Persistence
Explanation about detached entities, why occurs the”Detached Entity Passed to Persist” error occurs and how to prevent it.
Constraint Composition with Bean Validation
Filed under Java
Learn how to group multiple constraints under a single, custom annotation to reduce code duplication and improve readability
Joining Tables With Spring Data JPA Specifications
Filed under Spring Data
Learn how to use JPA Specifications to query a table based on one of its associated entities.
Hibernate’s “Not-Null Property References a Null or Transient Value” Error
Filed under Persistence
Learn about Hibernate’s PropertyValueException. In particular, the “not-null property references a null or transient value” error message.
Distinct Queries in HQL
Filed under Persistence
A quick and practical guide to distinct queries in HQL.
Subtract Days from a Date in Java
Filed under Java Dates
Explore several ways to subtract days from a date object.