🍃 Spring Boot

Spring Core Concepts

15 lessons in this section of the Spring Boot tutorial. Work through them in order, or jump to the one you need.

  1. 1.Inversion of Control (IoC)

    Inversion of Control is the foundational design principle behind Spring Framework.

  2. 2.Dependency Injection (DI)

    Dependency Injection is the mechanism Spring uses to implement Inversion of Control.

  3. 3.Bean Lifecycle

    Every Spring bean goes through a precise lifecycle — from BeanDefinition registration through instantiation, dependency injection, initialization callbacks, active use…

  4. 4.Bean Scopes

    Bean scope determines how many instances of a bean Spring creates and how long each instance lives.

  5. 5.ApplicationContext

    ApplicationContext is the central interface of the Spring IoC container.

  6. 6.BeanFactory

    BeanFactory is the root interface of Spring's IoC container — the most basic form of the container that provides dependency injection and bean management.

  7. 7.Component Scanning

    Component scanning is the mechanism Spring uses to automatically discover and register beans.

  8. 8.Java-based Configuration

    Java-based configuration uses @Configuration classes and @Bean methods to define Spring beans programmatically — replacing XML configuration with type-safe, IDE-friendly…

  9. 9.XML-based Configuration

    XML-based configuration was Spring's original configuration mechanism — declaring beans, dependencies, and wiring in applicationContext.xml files.

  10. 10.Constructor Injection

    Constructor injection is the recommended dependency injection style in Spring.

  11. 11.Setter Injection

    Setter injection provides dependencies through setter methods after the bean is constructed.

  12. 12.Qualifier Annotation

    The @Qualifier annotation resolves ambiguity when Spring finds multiple beans of the same type.

  13. 13.Primary Annotation

    The @Primary annotation marks one bean as the default candidate when multiple beans of the same type exist in the Spring container.

  14. 14.Lazy Initialization

    By default, Spring creates all singleton beans at application startup — eager initialization.

  15. 15.Environment & Profiles

    Spring's Environment abstraction provides unified access to configuration properties from all sources — property files, environment variables, system properties, and…