Hi,
I installed 4.0GA, and looked at the new Spring capabilities. They are very close to very useful, but for one thing – no support for multiple applicationContext files.
It is not unusual to break up large Spring configurations into multiple files – I have one for my core beans, one for Spring-managed Struts actions, and one for acegi.
Although the “add spring support” wizard only allows a single file to be selected, the .springBeans file hints that this may be possible – I can set it to:
<configs>
<config>web/WEB-INF/applicationContext-business.xml</config>
<config>web/WEB-INF/applicationContext-struts.xml</config>
<config>web/WEB-INF/applicationContext.acegi-security.xml</config>
</configs>
But I get validation errors because the plugin can’t resolve non-local bean references.
I also tried using a composite file with XInclude:
<?xml version=”1.0″ encoding=”UTF-8″?>
<beans xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”
xmlns:xi=”http://www.w3.org/2001/XInclude”
xsi:noNamespaceSchemaLocation=”spring-beans.xsd”>
<import resource=”applicationContext-acegi-security.xml”/>
<import resource=”applicationContext-business.xml”/>
<import resource=”applicationContext-struts.xml”/>
</beans>
This file validates OK, even when there are intentional errors.
So, assuming I haven’t missed anything, it looks like multiple-file support is planned but incomplete 🙂
John Latham