From the course: Spring: Framework in Depth
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Init: Differences based on configuration
From the course: Spring: Framework in Depth
Init: Differences based on configuration
- [Instructor] I alluded to the fact earlier that there are some differences in the initialization phase based on the configuration types, and I do want to just spent a moment and talk about some of those differences. This actually occurred during the instantiate bean and setters called phases, for the most part. With Java config, those two sections, the instantiation and the setters being called, or actually merged into one, and you do that with the method that you annotate with @Bean. So each one is executed in proper order still by the framework, but only the works specified within the @Bean method is executed during the Bean lifecycle. So as the bean's coming up, if you don't put it in that method, it doesn't get done, which is why those two steps are merged when you're dealing with Java configuration. Now autoconfiguration, instantiation of all beans are scanned, so everything is scanned in order to be…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Why the lifecycle is so important3m 38s
-
The overall picture2m 25s
-
(Locked)
The init phase: Loading bean definitions2m 54s
-
(Locked)
Init: Bean factory post-processing3m 55s
-
(Locked)
Init: Bean instantiation3m
-
(Locked)
Init: Setters1m 54s
-
(Locked)
Init: Bean post-processing3m 25s
-
(Locked)
Init: Differences based on configuration2m 49s
-
(Locked)
The use phase1m 56s
-
(Locked)
The destruction phase2m 6s
-
(Locked)
-
-