IDEA shows error on autowiring

Hello.

In our spring-application i created some spring bean via ServiceClientFactory (my own class).

<bean id="someServiceInterface" factory-method="init">



When i use autowiring in other bean, IDEA shows error that it cant find bean with type "SomeServiceInterface".
ServiceClientFactory returns object of type "SomeServiceInterface".

Is there ways to write xml-config of bean declaration that IDEA will understand correctly?
5 comments
Comment actions Permalink

Hi Alexander,

If it's valid (working) spring xml, then it most likely is an IDEA bug.
Can you create a minimal self-contained example, and report it http://youtrack.jetbrains.net/issues/IDEA#newissue=yes?

-tt

0
Comment actions Permalink

Hi.

This is part of xml config: https://gist.github.com/995739
It describes bean (web service client) created by factory.

This is factory: https://gist.github.com/995745

This config works, so it must be valid :)

0
Comment actions Permalink

Hi Alexander,

It looks similar to the following issue: http://youtrack.jetbrains.net/issue/IDEA-65332
(please add your vote and example to it if you agree).

IDEA could infer the return type of the static factory method from the provided class parameter, but currently does not.

Is the "init" method highlighted red for you?

-tt

0
Comment actions Permalink

No, only autowired field in other bean underscored (red color).

0
Comment actions Permalink

Yes, it is the same bug. Voted.
Waiting for fix because it is very annoying and my сolleagues tell me that i deleted this code :)

0

Please sign in to leave a comment.