Skip to main content

15 docs tagged with "spring-framework"

View all tags

Bean Lifecycle

The complete lifecycle of a Spring bean — from instantiation and dependency injection, through initialization callbacks, to destruction — and how to hook into each stage.

Bean Scopes

How Spring's bean scopes — singleton, prototype, request, session, and application — control when beans are created, how many instances exist, and how they interact with each other.

Chain of Responsibility Pattern

A behavioral pattern that passes a request along a chain of handlers, each deciding to process it or pass it to the next handler.

Dependency Injection

How Spring's container wires beans together using constructor, setter, and field injection, and when to use @Autowired, @Qualifier, and @Primary.

IoC Container

How Spring's Inversion of Control container manages bean definitions, wires dependencies, and controls object lifecycle using ApplicationContext and BeanFactory.

Observer Pattern

A behavioral pattern where an object (subject) maintains a list of dependents (observers) and notifies them automatically when its state changes.

Proxy Pattern

A structural pattern that provides a surrogate object which controls access to another object, adding security, caching, logging, or lazy initialization transparently.

Spring AOP

How Spring's Aspect-Oriented Programming model applies cross-cutting concerns — logging, transactions, security, caching — using proxies, pointcuts, and advice without touching business logic.

Spring Events

How Spring's ApplicationEventPublisher and @EventListener provide a decoupled, in-process observer pattern for reacting to application state changes — including async and transactional event variants.

Spring Framework

Core Spring concepts — IoC container, dependency injection, bean lifecycle, AOP, events.

Spring Framework Interview Questions

Consolidated interview Q&A for Spring Framework covering IoC container, dependency injection, bean lifecycle, bean scopes, AOP, and Spring Events — beginner through advanced.

Spring Framework Overview

Quick-reference summary of Spring Framework concepts — IoC container, dependency injection, bean lifecycle, scopes, AOP, and events — for rapid revision before interviews.

Template Method Pattern

A behavioral pattern that defines the skeleton of an algorithm in a base class, deferring specific steps to subclasses without changing the overall structure.

Transactions — Practical Demo

Hands-on examples for @Transactional propagation, readOnly optimization, rollbackFor, the self-invocation trap, and programmatic transactions.

Transactions and @Transactional

How Spring's @Transactional works under the hood with AOP proxies, propagation levels, isolation levels, readOnly optimization, rollback rules, and the self-invocation trap.