|
From: bryan <nih...@gm...> - 2004-09-17 13:15:54
|
It is true, i tried implementing this myself and had no success. It is caused by the fact that "Bean definitions in ancestor contexts are visible to descendant contexts but never the reverse" ... is there a specific reaso= n=20 for this apart from preventing endless loops etc ?=20 --b On Fri, 17 Sep 2004 14:57:47 +0200, j=FCrgen h=F6ller [ werk3AT ] <jue...@we...> wrote: > I can certainly add support for a delimited list of resource locations. H= owever, you will not be able to use a PropertyPlaceholderConfigurer for tho= se locations: Such BeanFactoryPostProcessors get applied after all bean def= initions have been registered. And I don't see a chance to change this with= the current semantics... >=20 > Juergen >=20 >=20 > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...]On Behalf > Of bryan > Sent: Thursday, September 16, 2004 6:04 PM > To: spr...@li... > Subject: Re: [Springframework-developer] Import tag for XML bean > definitions >=20 > juergen .... you are a legend !!!! >=20 > Hey one thing though .. >=20 > Would it be possible to allow the user to specify a list like > so ....... >=20 > <import resource=3D"myImport1.xml,myImport2.xml,myImport3.xml"/> >=20 > The reason that this would be *super* *super* usefull is because then > users could store these values in a properties file or in the registry > using the Preferences API and then use the property placeholder > configurer to fill in the blanks at runtime. >=20 > On other thing ..... if you wanted to be super smart and really show off > heres a cool feature .... >=20 > <beans> > <if value=3D"test" equals=3D"test"> > <import resource=3D"myImport1.xml"/> > </if> >=20 > <bean ... /> >=20 > </beans> >=20 > --b >=20 > On Thu, 16 Sep 2004 10:22:12 +0200, j=FCrgen h=F6ller [ werk3AT ] >=20 >=20 > <jue...@we...> wrote: > > Hi everybody, > > > > During an extra evening I had to spend at an airport hotel in Rome, I'v= e 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 con= tains the import tags. Effectively, this is delegated to the "createRelativ= e" method on the Resource interface, invoked on the Resource object for the= containing file. ("createRelative" has already been introduced in 1.1 fina= l.) > > > > I'll commit this tonight, provided that there aren't any objections. Wh= ile I'm not gonna recommend this feature too much, as I personally prefer a= "contextConfigLocation" that refers to multiple files, I still believe tha= t an import tag is a useful addition. In particular, some people are used t= o such a feature from Ant and XWork... > > > > Juergen > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > > Project Admins to receive an Apple iPod Mini FREE for your judgement on > > who ports your project to Linux PPC the best. Sponsored by IBM. > > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > > _______________________________________________ > > Springframework-developer mailing list > > Spr...@li... > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |