|
From: <jue...@we...> - 2004-09-16 08:21:53
|
Hi everybody, During an extra evening I had to spend at an airport hotel in Rome, I've = implemented an "import" tag for XML bean definitions: http://opensource.atlassian.com/projects/spring/browse/SPR-137 Basically, you can put any number of "import" tags at the beginning of = bean definition files: <beans> <import resource=3D"myImport1.xml"/> <import resource=3D"myImport2.xml"/> <bean ... /> </beans> The resource locations are interpreted as relative to the file that = contains the import tags. Effectively, this is delegated to the = "createRelative" method on the Resource interface, invoked on the = Resource object for the containing file. ("createRelative" has already = been introduced in 1.1 final.) I'll commit this tonight, provided that there aren't any objections. = While I'm not gonna recommend this feature too much, as I personally = prefer a "contextConfigLocation" that refers to multiple files, I still = believe that an import tag is a useful addition. In particular, some = people are used to such a feature from Ant and XWork... Juergen |