I have a class that must be initialized with an absolute pathname. The thing I want to initialize it with the pathname of is a file sitting in WEB-INF.
I am using the ContextLoaderListener from Spring to set this all into motion, so I can't run Java code to obtain the path from the context and stick it where a ${whatever} could find it.
Consider some bean definition like:
<bean class="my.class">
<property name="somePath" value="/WEB-INF/a.txt"/>
</bean>
I need a way, if possible, to make that pathname pass through the ServletContextResource mechanism. There doesn't seem to be a 'prefix' for those like classpath:
In this case, it won't help to have the item in the classpath, trust me.
EDIT:
I went and dug up the source of the bean class, and it already accepts Resources on the relevant properties. So Something Ridiculous is going on here, insofar as it complains as if it can't find things. Off to the debugger for me.
EDIT AGAIN:
So, this turns out to be a maven prank, unrelated to Spring. It's upvotes all around for your help, and open another question.