Best of Spring Boot — February 2026
- 1
- 2
- 3
freeCodeCamp·14w
How to Build Your Own Circuit Breaker in Spring Boot – and Really Understand Resilience4j
Learn how circuit breakers work by building one from scratch in Spring Boot. The tutorial walks through implementing a thread-safe state machine with explicit failure tracking, scheduler-driven recovery, and clear CLOSED/OPEN/HALF_OPEN transitions. Covers concurrency guarantees, failure classification, Spring integration via @Configuration, and when to use custom implementations versus Resilience4j. Includes complete working code with atomic counters, synchronized state transitions, and ScheduledExecutorService for time-based recovery.
- 4
Baeldung·16w
Set Datasource When Creating Hibernate SessionFactory in Java
Hibernate's SessionFactory can be explicitly configured with a Spring-managed Datasource by disabling JPA auto-configuration and manually wiring the connection pool. This approach provides fine-grained control over Hibernate bootstrapping, useful for multi-database setups or custom ORM behavior. The tutorial demonstrates using StandardServiceRegistryBuilder to inject the Datasource, configuring Hibernate properties programmatically, and validating the setup with JUnit tests in a Spring Boot application.