Could not autowire. There is more than one bean of 'XXX' type. Beans xxx, xxx, xxx.
Hi,
Using 11.0.1 I get the error in the title (that is, IDEA discovers 3 beans all with the same name for the same type0
The beans that IDEA discovered are discovered with context scanning (the @Component annotation) while the class which has @Autowire is manually defined in the spring context.
Both classes are in the same module. This is a low level module so it has no dependencies on other modules.
I've seen a discussion where it was suggested this can happen if there is more than one spring jar in the classpath. However, I'm using Maven, so I can't see how this can happen. Using spring 3.1
Regards,
Ittay
Please sign in to leave a comment.