Skip to main content

Uncategorized

@Transactional in Spring: Propagation, Isolation, and the Six Ways It Silently Does Nothing

All seven propagation values with runnable proof and transaction-manager logs, the rollback rules, and why catching an inner failure still ends in UnexpectedRollbackException. Plus six ways @Transactional is present, correct, and inert — two of which commit work the code was trying to abandon — and why Propagation.NESTED cannot be used with JpaTransactionManager at all. Spring Boot 4.1.1, JDK 25.

Spring AOP Explained: Pointcuts, Advice Types, and Why Your Aspect Isn’t Firing

An aspect that does not fire produces no error and no log line. A full reference for the ten pointcut designators Spring AOP supports (generated from real matches) and the fourteen it rejects, the difference between JDK and CGLIB proxies measured side by side, and a gallery of six aspects that silently do nothing. Includes two corrections to the reference documentation. Spring Boot 4.1.1, AspectJ 1.9.25.1, JDK 25.

Spring Boot Profiles Done Right: Config Import, Config Trees and Kubernetes ConfigMaps

You set a value in application-prod.yaml, deployed with prod active, and the old value is still in effect. The reason is a single line of the documented precedence list: config data is item 3 and environment variables are item 5. A measured walk through the precedence stack, profile groups and multi-document files, config trees and Kubernetes ConfigMaps, and the spring.config.import ordering that overrides you rather than the other way round.

@ConfigurationProperties vs @Value in Spring Boot 4: Binding, Validation and Relaxed Rules

@Value and @ConfigurationProperties are different mechanisms, not two styles. A measured matrix of which property spellings actually resolve (including the widely repeated claim about @Value and relaxed binding, which is wrong inside Spring Boot), record constructor binding and defaults, validation, and the JDK 23 change that silently stops your IDE metadata being generated. Verified on Spring Boot 4.1.1 and JDK 25.

Spring Security 7.1 JWT Authentication: The Complete Guide (Spring Boot 4.1)

A three-part guide to JWT authentication on Spring Security 7.1 and Spring Boot 4.1, written to be useful whether you have never issued a token or already run one in production. Part 1 starts from zero: what a token is, what is inside it, the two paths through the application, and the smallest configuration that verifies one. Part 2 opens the filter chain — writing the OncePerRequestFilter by hand, where it goes, what really decides 401 versus 403, why a permitAll() login endpoint still returns 403 with CSRF on, and how to choose a signing algorithm. Part 3 is everything the defaults do not check.

Java Value Classes (JEP 401): The Complete Guide to Project Valhalla’s First Preview (Beginner to Advanced)

A beginner-to-advanced guide to Java value classes (JEP 401), Project Valhalla's first preview targeting JDK 28. Learn what object identity costs (with runnable benchmarks), the value keyword, value records, the new construction rule, changed == semantics, Objects.hasIdentity, scalarization and heap flattening (with diagrams and a real 3x LocalDate benchmark), migrated JDK classes, migration rules, and what's not in the preview yet.

Spring Security 5 to 6 to 7 Migration: SecurityFilterChain, Lambda DSL, and the Silent Authorization Changes

Of every breaking change in the Spring Boot 2 → 3 era, the removal of WebSecurityConfigurerAdapter generated the most confused stack traces I've debugged — because security configuration is the one place where "it compiles and runs" tells you almost nothing about whether it still protects anything. This guide migrates Spring Security 5 configurations to the 6.x component model (Spring Boot 3.x), covers what tightens further in Spring Security 7 (Spring Boot 4), and flags the places where a mechanical conversion quietly changes your authorization behaviour.