All articles

Spring

What Spring and Spring Boot do between your annotations and a running application: bean lifecycle, proxies and transactions.

  1. What @Transactional Actually Does: Proxies, Thread-Bound Connections and the Rules of Rollback

    28 min read

    One annotation, and Spring opens a database transaction, shares its connection with every repository you call, and decides whether to commit or roll back. This article traces a single @Transactional call through the proxy, TransactionInterceptor and the transaction manager, then uses that model to explain propagation, isolation, rollback rules and the pitfalls that follow from them.

    • Spring Boot
    • Spring Framework
    • Java
    • Transactions
    • Spring AOP
    • JDBC
    • JPA
    • Databases
    • Backend Engineering
  2. What Really Happens Before Your Spring Boot Application Starts: The Complete Spring Bean Lifecycle

    25 min read

    Follow a single Spring bean from a class file on disk to a proxied, initialized singleton and finally to destruction. Using real output from a running application and the actual call sequence inside AbstractApplicationContext and AbstractAutowireCapableBeanFactory, this article explains bean definitions, BeanFactoryPostProcessors, BeanPostProcessors, dependency injection, initialization callbacks, AOP proxies, the three-level singleton cache, circular dependencies, startup events, and graceful shutdown.

    • Spring Boot
    • Spring Framework
    • Java
    • Dependency Injection
    • Bean Lifecycle
    • ApplicationContext
    • Backend Engineering
    • Microservices
    • Java Internals
    • System Design