Performance: @Qualifier for ambiguous beans
MEDIUM IMPACT
This affects application startup time and dependency injection resolution speed.
public class Service { @Autowired @Qualifier("paypalProcessor") private PaymentProcessor paymentProcessor; }
public class Service {
@Autowired
private PaymentProcessor paymentProcessor; // multiple beans of PaymentProcessor exist
}| Pattern | Bean Lookup | Resolution Time | Startup Delay | Verdict |
|---|---|---|---|---|
| No @Qualifier with multiple beans | Multiple beans scanned | High | Noticeable delay | [X] Bad |
| @Qualifier specifying bean | Single bean direct lookup | Low | Minimal delay | [OK] Good |