Add core-di: constructor vs setter vs field injection and @Autowired candidate resolution on Boot 4.1
Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JoVmf2fWvcpoXndcDSwRf7
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
# Who wins when several rules apply at once? (one mini-context per row)
|
||||
|
||||
beans registered / injection point winner
|
||||
---------------------------------------------------------- --------------------
|
||||
@Primary Stripe + Paypal; CheckoutPlain PrimaryStripeGateway
|
||||
@Primary Stripe + Paypal; @Qualifier("paypalGateway") PaypalGateway
|
||||
@Priority(1) Stripe + @Priority(2) Paypal; CheckoutPlain PriorityOneGateway
|
||||
@Priority(1) + Paypal(no priority); param named paypalGateway PaypalGateway
|
||||
Stripe + Paypal (plain); param named paypalGateway PaypalGateway
|
||||
Stripe (plain) + @Fallback Paypal; CheckoutPlain StripeGateway
|
||||
@Fast custom qualifier, FastGateway + Paypal; @Fast param FastGateway
|
||||
Reference in New Issue
Block a user