This chapter introduces you to the core concepts of Spring, including the project structure, Spring Beans, dependency injection, and bean scopes. You will learn how to create and manage beans, understand the different injection methods, and explore the lifecycle of beans in a Spring Boot application.
Overview
Syllabus
- Unit 1: Understanding Spring Boot
- Starting Your First Spring Boot Application
- Unit 2: Understanding Project Structure
- Change Server Port Configuration in Spring Boot
- Adding Spring Boot Actuator Dependency
- Unit 3: Creating and Managing Spring Beans
- Spring Boot Bean Management Basics
- Declaring Beans with @Component Annotation
- Creating Spring Beans with the @Bean Annotation
- Fix the Bean Configuration Bug
- Unit 4: Dependency Injection in Spring
- Spring Dependency Injection in Action
- Switching from Setter Injection to Constructor Injection
- Switching from Constructor Injection to Field Injection
- Injecting Dependencies into SaladMaker
- Creating and Injecting Beans Using @Bean Annotation
- Unit 5: Bean Scopes and Lifecycle
- Understanding Spring Bean Scopes
- Prototype Scopes for Bread and Cheese
- Update Beans to Use Prototype Scope
- Implementing Bean Lifecycle Methods in Spring Boot
- Unit 6: Advanced Wiring in Spring Boot
- Advanced Bean Wiring in Spring Boot
- Optional Dependency Injection with java.util.Optional
- Optional Dependencies with Setter Injection
- Injecting Ingredient Collection into PizzaMaker