Cleaning Up Spurious SpringIDE Warnings

I've been using SpringIDE for my Spring applications for a while now, and it is a very nice tool. It makes visualising your Spring configuration files, navigating through beans, and spotting configuration errors, much easier all round. Not to mention the nice Spring Webflow editor.

However, one thing has been irritating me for some time. Consider the following screenshot:

spring-warning.png

Eclipse (or, more precisely, SpringIDE) is complaining that it can't find the sessionFactory bean. Now, you can take my word for it, the sessionFactory bean does exist, it's just defined in another Spring configuration file. It is my habit to split my Spring bean configuration between several configuration files, which makes things more flexible and easier to understand.

But these warnings were bugging me. I'd declared all the Spring configuration files in the SpringIDE section of the project properties (see below), but Eclipse still didn't seem to be able to find the references to beans in other files.

spring-config-files.png

As it turns out, the solution was right in front of me. You just have to go to the Config Sets tab and create a Config set containing all of your configuration files.

Spring configuration set

Once you've done this, everything works fine, and no more spurious warnings!

John is a freelance consultant specialising in Enterprise Java, Web Development, and Open Source technologies, currently based in Wellington, New Zealand. Well known in the Java community for his many published articles, John helps organisations to optimize their Java development processes and infrastructures and provides training and mentoring in open source technologies, SDLC tools, and agile development processes. John is principal consultant at Wakaleo Consulting, and runs several Training Courses on open source Java development tools and best practices. John is a DZone MVB and is not an employee of DZone and has posted 58 posts at DZone. You can read more from them at their website.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Zviki Cohen replied on Sat, 2008/04/12 - 1:58am

A+

Works great. Thanks!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.