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

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