From the course: Creating Spring Boot Microservices

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Inversion of control pattern

Inversion of control pattern

- [Instructor] Before we get into creating Spring Boot microservices, let me give you a brief introduction to the basic core Spring framework. Spring Core is an open-source framework providing dependency injection of Spring beans. This is via the Spring application context. The Spring application context follows the inversion of control design pattern. So what is dependency injection or DI? DI separates usage of objects from dependence. Dependency creation is managed outside the class which results in flexibility, maintainability, and ease of unit testing. An inversion-of-control framework or IOC maintains the lifecycle of an object and requires dependency injection. The class relinquishes control, hence inversion of control to the framework. The Spring application context or Spring container is the IOC framework of Spring. A Spring bean is a Java object managed by the Spring container. Default scope is singleton, but there are other scopes which we will not be using, some of which…

Contents