False 'Could not autowire' message in beans.xml

I have the following xml file :

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"

    <bean id="logger" class="com.skiabox.apps.Logger">


    <bean id="consoleWriter" class="com.skiabox.apps.ConsoleWriter" primary="true">


    <bean id="panda" class="com.skiabox.apps.ConsoleWriter">


    <bean id="fileWriter" class="com.skiabox.apps.FileWriter">


    <bean id="squirrel" class="com.skiabox.apps.FileWriter" autowire-candidate="false">


and the logger bean gives a 'Could not autowire' error although I have added the primary property to the first bean of ConsoleWriter type.
The application compiles an run successfully.
So probably this is a bug.

1 comment
Comment actions Permalink

Could you please create an issue https://youtrack.jetbrains.com/issues/IDEA and attach the sample project as ZIP? Thanks.


Please sign in to leave a comment.