Spring has many Core components, but Core, Context, and Bean constitute its skeleton.
Spring Core components
Spring has many Core components, but Core, Context, and Bean constitute its skeleton.
Bean
Among the three, Bean is the core of the core. Bean implements the configuration file for objects, and Spring manages object storage space and lifecycle allocation. Through dependency injection, you can inject objects into the specified business logic class. These injection relationships are managed by the Ioc container.
Therefore, Spring's core idea is often called BOP (Bean Oriented Programming) and Bean-Oriented Programming.
Bean components are defined under the org. springframework. beans package of Spring, which solves the following problems:
Bean definition
Bean creation
Bean parsing
Users only need to pay attention to Bean creation. The other two processes are completed by Spring.
, ApplicationContext interacts with ResourceLoader through the ResourcePatternResolver interface to load, parse, and describe resources. ResourcePatternResolver encapsulates and integrates resources to facilitate the use of other components.
Summary
This article mainly summarizes the relationship between the three core components that constitute the Spring skeleton framework and some experiences in understanding the implementation principles of the three components.