There's one thing I never understood after so many years of using Spring IDE and Spring Tool Suite (STS). I'm using XML configuration files. One file (say "applicationContext.xml") imports other XML files, through the use of:
<import resource="classpath:path/to/otherContextFile.xml" />
In my Eclipse project properties, under Spring | Beans Support, the option "Enable support for <import/> element in configuration files" is enabled.
In the same project properties page, if the list of the configuration files only contains applicationContext.xml, STS is nevertheless able to detect the contents of otherContextFile.xml and parses it correctly.
However, what I see is that if STS performs an autodetection of configuration files, it always adds to that list otherContextFile.xml as well. But adding all the imported configuration files to that list sounds like the option "Enable support for <import/> element in configuration files" is then useless to me. Since I like to keep my project setup clean and tidy, when this happens I usually remove the imported files from that list.
However, every now and then, the automatic scan is triggered (maybe on STS upgrade or I don't know...) and those files are re-added. This makes me think that it might be a better choice to keep them listed anyway...
So, the question is: what is more correct, elegant and efficient (from a performance point of view)? Just list the "root" configuration files or all of them (even the imported ones)? And if the answer is the latter, what's then the point of that option "Enable support for <import/> element in configuration files"?