- This topic has 2 replies, 3 voices, and was last updated 19 years, 1 month ago by dlread.
-
AuthorPosts
-
LathamJohnPMemberHi,
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
Riyad KallaMemberJohn,
If you right click on your project root, go to Properties > MyEclipse-Spring, you can click Add to add your spring config files here.
dlreadMemberrkalla wrote:
If you right click on your project root, go to Properties > MyEclipse-Spring, you can click Add to add your spring config files here.
This is true, but I’m finding John’s statement is also true.:
But I get validation errors because the plugin can’t resolve non-local bean references.
Even though you can specify multiple Spring config files, I’m finding that externally referenced beans (a bean defined in one config file but used in another config file) are erroneously being marked as validation errors.
Is anybody else having this problem?
MyEclipse Build: 20050829-4.0.0-GA
Eclipse v3.1.0 Build: I20050627-1435-Lee-
-
AuthorPosts