Am 12.02.2009 um 14:29 schrieb Leszek Gawron:
Benjamin Boksa wrote:
Hi Leszek,
thanks you very much for looking into my problem:
I have run your test scenario. Please use the following statement:
<configurator:settings>
<configurator:include-beans dir="classpath*:/META-INF/foo-
service/spring"/>
<configurator:include-properties dir="classpath*:/META-INF/
foo-service/properties"/>
</configurator:settings>
using classpath*: ensures that spring will scan all available jars
for that path and aggregate the results.
That (scanning all jars) actually was one of the things I tried to
avoid (as this might cause problems with the same directories
existing in two jars). Not very likely, I know, but avoidable as
the configurator test-case shows.
One more comment: there is completely no problem if every jar has /
META-INF/properties/application.properties file. Every file has
unique URL and the property placeholder will pick all of them. Treat
it more like a nice feature than a problem :)
Not sure if I understand you on that one… Let's assume there are two
"foo.properties" files both containing a property "bar" - when using
the settings above how does the spring-configurator decide which is
the right property to use? I think this might result in a problem (the
wrong "bar"-property is used)…
However the big problem/misunderstanding/bug is that with my the
original settings
<configurator:settings>
<configurator:include-beans dir="/META-INF/foo-service/spring"/>
<configurator:include-properties dir="META-INF/foo-service/
properties"/>
</configurator:settings>
the bean definitions seem to be read correctly while the properties
are not - which I absolutely can't understand. I feel a bit like going
in circles and can't find any good resources (despite of Leszek ;-) )
which might help me solve this problem.
So if you have further information please let me know :-)
Thanks for you time
Benjamin