Spring > Core > Constructor Argument Type Resolution
Constructor Argument Type Resolution
Spring Inversion of Control (IoC) also known as
Dependency Injection (DI) is a process by which
objects define their dependencies with collaborating objects.
Spring uses the arguments defined in the bean definition in the same order
while invoking constructor as long as there is no ambiguity.
For instance string "1234" might require to be injected as a either string or number
depending on the context. Spring cannot resolve such ambiguity by itself. In such cases we can
resolve the ambiguity by explicitly specifying argument type in bean definition.