Skip to main content

Java

Compact Source Files and Instance Main Methods in Java 25 (JEP 512)

Java 25 finalizes JEP 512: void main() in a file with no class, the java.lang.IO helper, implicit java.base imports, the measured launcher order, and a private-constructor difference between JDK 25 and 27 — every claim compiled and run, with transcripts.

Multiple DataSources in Spring Boot 4 with Spring Data JPA

Two databases in one Spring Boot 4.1 application: a DataSource, Flyway, EntityManagerFactory and transaction manager per database, package-based repository scanning, and every way it fails, each run and quoted from a committed transcript.

Spring Application Events: @EventListener, @TransactionalEventListener and Async Events

Spring events are blocking method calls, and that one fact explains the surprises: a listener that rolls the publisher back, an AFTER_COMMIT listener that silently never runs, and an async listener that sees a different world. Every claim is reproduced on Spring Boot 4.1 with a committed transcript, including a rollback that proves AFTER_COMMIT semantics.

Write Your Own Spring Boot 4 Starter: Auto-Configuration, @Conditional and Properties

Build a real Spring Boot 4.1 starter from an empty directory: the two-jar layout, AutoConfiguration.imports, @ConditionalOnMissingBean back-off, configuration metadata, an optional Jackson 3 integration, and the ApplicationContextRunner test that passes while the starter is broken. Every claim comes from a committed transcript.

Circular Dependencies in Spring Boot 4: Why Startup Fails and 4 Ways to Fix It

Spring Boot 4 refuses to start with "The dependencies of some of the beans in the application context form a cycle". This article reproduces the failure, reads the report, and applies four fixes (redesign, events, @Lazy, ObjectProvider), plus what allow-circular-references really does on Spring Framework 7.0.9. Every claim comes from a committed test transcript.