A code-cleanup refactor makes a repository class's methods `final` "since nothing should override them." Four months later, a database failover reveals that `@Retryable` on one of those methods had been doing nothing since the refactor. Why did marking a method `final` silently disable the annotation, with no error at any point?
Spring Boot's default way of making an annotation like @Retryable or @Transactional actually do something is to generate a CGLIB proxy — a real Java subclass of the bean's own class — that overrides the annotated method and runs the advice around a call to super. A final method cannot be overridden by any subclass, CGLIB included, so the generated subclass simply inherits the method unchanged: no interception ever happens, the original method body runs exactly as written, and nothing anywhere throws an error or logs a warning about it, because from the JVM's point of view a subclass failing to override a final method isn't an error — it's not even attempted, since Java itself forbids it at compile time for CGLIB's generated bytecode the same way it would for hand-written source.