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: Spring Boot Basics
- Spring Boot Introduction with Gradle and Kotlin
- Unit 2: Understanding Spring Boot Project Structure
- Changing the Default Port in a Spring Boot Application
- Add Spring Boot Actuator Dependency
- Unit 3: Spring Beans
- Managing Beans with @Bean and @Component Annotations
- Adding the @Component Annotation to a Class
- Create Spring Beans Using @Bean Annotation
- Diagnose Bean Initialization Issue
- Unit 4: Dependency Injection in Spring Boot
- Dependency Injection in Spring Boot with Setter Injection
- Switch from Field Injection to Constructor Injection
- Switch to Field Dependency Injection in Kotlin
- Wiring Dependencies in SaladMaker
- Creating and Injecting Beans with @Bean Annotation in Kotlin
- Unit 5: Bean Scopes and Lifecycle
- Managing Bean Scopes and Lifecycle in Spring Boot
- Managing Prototype-Scoped Beans in Spring Boot
- Modifying Bean Scopes to Prototype
- Implementing Bean Lifecycle Methods in a Salad Shop
- Unit 6: Advanced Bean Wiring in the Spring Framework
- Advanced Bean Wiring Techniques in Spring Boot
- Adding Optional Dependencies to an AmericanSandwich
- Wiring Collections of Beans in Spring Boot Application