Files
spring-boot-demo/core-di/output/10-no-unique-bean.txt
T

9 lines
693 B
Plaintext

# Two PaymentGateway beans and a consumer that asks for one
started: false
top exception : org.springframework.beans.factory.UnsatisfiedDependencyException
top message : Error creating bean with name 'checkoutPlain': Unsatisfied dependency expressed through constructor parameter 0: No qualifying bean of type 'com.ankurm.coredi.injection.PaymentGateway' available: expected single matching bean but found 2: stripeGateway,paypalGateway
root cause : org.springframework.beans.factory.NoUniqueBeanDefinitionException
root message : No qualifying bean of type 'com.ankurm.coredi.injection.PaymentGateway' available: expected single matching bean but found 2: stripeGateway,paypalGateway