From the course: Spring Framework in Depth
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Init: Bean instantiation - Spring Framework Tutorial
From the course: Spring Framework in Depth
Init: Bean instantiation
- [Instructor] So now we're going to start looking at actions that are taken on each individual bean in the factory with the instantiation phase. This is the high level overview of the initialization phase that we've seen several times now. And in this case, we're talking about the instantiation of the beans. We're going to actually go create some stuff now. And of course, creating things in an object-oriented language means construction. So beans are instantiated in the factory using their constructors. Now remember. When there is only one constructor that can constructors used. When there are multiple ones, Spring has to know which one to use. So you must have autowired one for Spring to know which constructor to use. Otherwise, you're going to run into issues. The important thing to note here is that part of the BeanFactory post-processing is determined the order that construction must occur in order to satisfy the dependencies of each class. So the order is done correctly without…
Contents
-
-
-
-
-
-
(Locked)
Why the lifecycle is so important3m 45s
-
(Locked)
The overall picture1m 57s
-
(Locked)
The init phase: Loading bean definitions3m 29s
-
(Locked)
Init: Bean factory post-processing3m 49s
-
(Locked)
Init: Bean instantiation3m 21s
-
(Locked)
Init: Setters1m 51s
-
(Locked)
Init: Bean post-processing3m 8s
-
(Locked)
Init: Differences based on configuration2m 46s
-
(Locked)
The use phase3m 2s
-
(Locked)
The destruction phase3m 15s
-
(Locked)
-
-