The Spring IoC container

The Spring IoC container creates the beans and wires them together according to the configuration setup created by the application developer.

The following questions need to be answered:

  • Question 1: How does the Spring IoC container know which beans to create? Specifically, how does the Spring IoC container know to create beans for the BusinessServiceImpl and DataServiceImpl classes?
  • Question 2: How does the Spring IoC container know how to wire beans together? Specifically, how does the Spring IoC container know to inject the instance of the DataServiceImpl class into the BusinessServiceImpl class?
  • Question 3: How does the Spring IoC container know where to search for beans? It is not efficient to search all packages ...

Get Mastering Spring 5.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.