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

Init: Differences based on configuration

From the course: Spring: Framework in Depth

Start my 1-month free trial

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…

Contents