Spring Facet and programming against interfaces

Hi,

I'm working with a maven project which has several modules. We split up our interfaces from our implementations and put them into different modules. Our implementation is Spring annotated and we use the interfaces to wire our beans. Whenever I work on a sub-project which uses spring autowiring, I get errors 'Could not autowire. No beans of type X found.'. The dependencies only include the interface module and the implementation module is only added at the end of the line in our war project. Is there any way to allow Intellij to see the complete project when using the Spring Facet on a module to prevent these errors?

Regards,
Jan

0
4 comments

Does adding the impl module to runtime dependencies help?


0
Avatar
Permanently deleted user

It doesn't seem to help.

I tried adding a runtime dependency through Intellij's module configuration and a dependency with scope runtime in maven. But the error still persists.

0

Could you please file an issue http://youtrack.jetbrains.com/issues/IDEA

Please include a minimal test project which mimics your real project and/or provide more detailed information about your project (project structure, Spring facet configuration, pom.xml files etc).
You can set visibility to "idea-developers" to hide sensitive information.

Thanks!

0
Avatar
Permanently deleted user

I was creating an example project to report this issue, but I noticed that we're having a somewhat different setup concerning Spring than usual. I'll first investigate a little further before registering this.

We've got a web.xml with a contextConfigLocation defined, besides using the dispatcher servlet. The first one defines a component scanner as well as the second one, but they are trying to define a mutual exclusive set of areas to scan. So it might be due to this setup instead.

I'll need a bit a bit more time to extract the case, but I'll get back to this thread in any case to either create a ticket or report back on a fixed setup.

Kind Regards,
Jan

0

Please sign in to leave a comment.