I am trying to share Spring object definitions between a web application, unit testing, and possibly a console app. I would like to define the object definitions in one place and import them.
My first pass was to place 'entities.xml' in the same folder as web.config but the relative paths aren't what I expect:
<context>
<resource uri="config://spring/objects"/>
<resource uri="file://entities.xml"/>
</context>
and
<objects xmlns="http://www.springframework.net">
...
<import resource="file://entities.xml" />
produce the same error:
Could not find file 'c:\windows\system32\inetsrv\entities.xml'
the 'current directory' isn't the web app, it's specific to inetsrv.
I would rather not hard-code the full path to this file because it may vary on the test vs. production servers. Is there a better way to share this config info?