Spring > Core > Constructor Argument Name Resolution
Constructor Argument Name 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 name in bean definition.
We have to use @ConstructorProperties annotation to specify constructor argument names
in class definition.