79265196

Date: 2024-12-09 13:52:11
Score: 1
Natty:
Report link

If there are multiple beans that match the criteria of injecting a dependency then Spring will through an error. It won't pick one on its own. There are several ways of defining criteria like using specific type instead of a generalized one or using @Qualifier or @Primary etc. but if no preference can be calculated based on all the available criteria then this is broken configuration and must be fixed.

Reasons:
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: Haris Mushtaq