IDEA 11 Spring Component-Scan Not Finding Beans
I just upgraded from IntelliJ 10.5.4 to 11.0.2 and have an issue where my Spring beans that are annotated with @Component are no longer getting recognized using the Spring "component-scan" XML tag. This functionality under IDEA 10.5.4 (with the same project) works fine. The Spring configuration line in my Spring context looks as follows:
<context:component-scan base-package="org.mydomain.xxx"/>
"org" is highlighted in green where mydomain and onwards are highlighted in red. When I attempt an auto-complete after "org.", the only package that gets displayed is "hibernate" and nothing else. Under 10.5.4, auto-complete shows many other packages, including mydomain.
I checked all the obvious configurations (i.e. classpath, facets, Spring file sets) and can't find anything that looks wrong.
At this point, I'm stuck going back to 10.5.4 until I can get this issue resolved. Thanks.
- Andrew
Please sign in to leave a comment.
Is your spring config located in the same module as your classes?
Could you upload a sample project to reproduce the problem?
Yes - the Spring configuration is in the same module as the classes. This is part of a large project with many moduels and Spring imports, so it will be hard to reproduce in a sample project. I am currently communicating with Serge Baranov about this issue as well. BTW - We have many developers who are having the same issue. I tried using the 11.1 EA release and it has the same problem.
Please follow http://youtrack.jetbrains.com/issue/IDEA-81913 that seems to
be the same problem.
That does sound like the same problem. I'll be sure to follow its progress. Thanks!