Using the Spring facets in a bigger project

Hi,

I'm trying to start using the Spring integration of IDEA 7.0 with an existing project. The project has about 30 modules and I feel I lack some information to get started. Is there some good tutorial / documentation about the subject?

My biggest issue is that although IDEA 7.0 detects Hibernate facets, it does not do the same for Spring facets. I'm forced to add them manually, and I don't even know where exactly. Do I need to create a separate facet for every module? Or should I have some kind of root module that depends on all of the modules, so that I can create one Spring facet with a big "File Set" for all the bean definitions in my project? Either way seems a bit inconvenient and I can't help feeling that I must be missing something, because the setup shouldn't be so difficult..

1 comment

It depends on how you're using Spring in your project.

How are the configuration files distributes across you modules? How is the end result packaged/deployed etc? Are you using (spring) import elements? What does you module dependency graph look like?

You can add the Spring facet to any module, and a facet can contain multiple filesets (modelling Spring ApplicationContexts). When the module dependency graph has one "root" (for example a web module depending on a bunch of library modules), it's logical to add the facet there.

However you might want to add facets/filesets to other modules if they contain an application context made up of more than one file (perhaps as part of a standalone service or unit test?).

As far as I know IDEA detects spring facet filesets from "web.xml", although I haven't used that feature recently. As far as I know IDEA 7.0 lacks the ability to explicitly invoke the facet detection process, see this ticket:
http://www.jetbrains.net/jira/browse/IDEA-15451

Anyway, please provide some additional details, perhaps I can offer some advice.

0

Please sign in to leave a comment.