Spring & Hibernate
The IoC container and bean lifecycle, proxies and AOP, @Transactional, the JPA persistence context, and the database isolation anomalies underneath it all.
The parts of the Spring / Hibernate stack that interviews probe once “I’ve used Spring Boot”
is on the table: what the container actually does with your classes, why most of Spring’s
“magic” is a proxy, what @Transactional really controls, when Hibernate actually sends SQL,
and the isolation-level anomalies (dirty reads, dirty writes, lost updates…) that decide
whether two concurrent requests corrupt each other’s data.
Subtopics
- IoC container & beansMid / SeniorDependency injection, stereotype annotations, @Bean vs @Component, the bean lifecycle, scopes, and circular dependencies.19 concepts
- Proxies & AOPMid / SeniorJDK dynamic proxies vs CGLIB, the self-invocation trap, and the AOP vocabulary behind @Transactional, @Async and @Cacheable.7 concepts
- @Transactional & transaction managementMid / SeniorHow @Transactional works, when changes actually reach the database, rollback rules, propagation, readOnly, and the classic pitfalls.12 concepts
- Hibernate & JPAMid / SeniorThe persistence context, entity states, persist vs merge, flushing, lazy loading, N+1, relationships, locking, batching, schema generation, and SQL logging.22 concepts
- Transaction isolation & concurrency anomaliesMid / SeniorACID, dirty writes, dirty reads, non-repeatable reads, phantoms, lost updates and write skew — and which isolation level prevents which.11 concepts
- Spring Boot & Spring MVCMid / SeniorAuto-configuration, externalized config, the DispatcherServlet request flow, filters vs interceptors, validation, the security filter chain, @Async, test slices, and Actuator.10 concepts
- Exception handlingMid / SeniorChecked vs unchecked, @ExceptionHandler and @ControllerAdvice, ProblemDetail, validation errors, exceptions vs transactions, and the common mistakes.14 concepts