Consider a factory bean. It takes a single property of type Map<String, Object>
. It carefully checks all the Objects for 'instanceof Resource' and does resource processing appropriately.
I configure this bean like:
<bean id='fact' class='my.class'>
<property name='map'>
<map>
<entry key="x" value="file:/WEB-INF/foo.txt"/>
</map>
</property>
</bean>
In the debugger, I see that the setter for the property is called with a Map, and the value is a java.lang.String with the file: still sitting on it.
Since there is no explicit prefix for servlet context resources, I am now officially puzzled.
In my previous question, the 'solution' turned out to be to correct a really stupid default configuration of the maven-jetty-plugin.
Apologies for the rewrit开发者_如何学Goe, but no one answered yet :-)
More and more googling eventually revealed:
<entry key="grammarURL">
<value type="org.springframework.core.io.Resource">classpath:/com/basistech/ras/rules.jape</value>
</entry>
精彩评论